Best way of using Java Arrays and ArrayLists

Java Arrays                                             In Java, an array is used to store a list of values of the same data type. They can also be referred to as a collection of variables…