You can increase and decrease the size of an Array
Responda
True
False
Questão 2
Questão
Which of the properties are the properties of an ArrayList?
Responda
It implements the interface List
It maintains it insertion
It doesn't allow duplicate value to be added to it
It allows null values to be added
Questão 3
Questão
What happens when you create the following object of an ArrayList?
ArrayList<String> anArrList = new ArrayList<>();
Responda
the no-argument constructor defined in the class ArrayList.java, constructs an empty list with an initial capacity of ten
the no-argument constructor defined in the class ArrayList.java, construct an empty list with an no capacity
Non of the above
Questão 4
Questão
Which of the statements are true ?
Responda
ArrayList defines a instance variable of type List to store all it's individual elements
ArrayList defines a instance variable of type Array to store all it's individual elements
The capacity of the ArrayList is the length of this instance variable
All are true
Questão 5
Questão
The reference to the instance variable that stores the element of the ArrayList is: elementData
Responda
True
False
Questão 6
Questão
The method addAll (Collection<? extends E> c) appends all the elements in the specified collection's to the end of this list, in the order they're returned by the specified iterator.
Responda
True
False
Questão 7
Questão
An Array can accept duplicate object values
Responda
True
False
Questão 8
Questão
What does clone method defined in the class ArrayList doe ? Which of the statements are true?
Responda
It creates a new instance of the ArrayList to be cloned
It copies the element references, but not the objects
Both of the answers are true
Non of the above
Quer criar seus próprios Quizzesgratuitos com a GoConqr? Saiba mais.