Trusted by students across multiple disciplines!
What is an Array? - Answer: an object used to store multiple values in a single variable.
What index does the Array start at? - Answer: Index 0. The first element in the array will
be the 0th index.
String[] puppies = {"Tibbers", "Volibear", "Annie", "Bingo"};
The first element is Tibbers which is located at the 0th index.
Are arrays mutable? - Answer: No, once the array is created it is fixed in size in
memory.
To add or remove elements, you have to create a new array.
Is an Array a Data Structure or a Collection? - Answer: Arrays are Data Structures as
they can hold primitive data types as well objects.
Collections can only hold object types but not primitive datatypes such as int, long,
short, etc.
This class contains various methods for manipulating arrays (such as sorting and
searching). - Answer: Arrays class
Why would we pass an array as a parameter? - Answer: We would pass the java array
to a method so that we can reuse the same logic on any array
What are multidimensional Arrays? - Answer: Multidimensional arrays make use of
multiple indexes to store data. Data is stored in row and column based index.
1
APPHIA - Crafted with Care and Precision for Academic Excellence.