How much do you know about computer science? Are you aware that computer disciplines are a well-utilized field and are very important for the progression of computer knowledge? Do you know the difference between an array and array list, why they have different names, and the array-based list's capacity? The array list grows on its own as you add to See moreit, so it takes care of itself. Compute this quiz, and you see how much do you score. All the best.
IllegalArgumentException
IllegalStateException
NullPointerException
RuntimeException
Rate this question:
The add method throws an exception
A new, bigger internal array is created, the elements are moved to the new array, the old internal array is deleted, and then the new element is added
The new element is not added, and -1 is returned
The new element is not added, and null is returned
Rate this question:
The elements at current positions 0..k must be moved toward the beginning of the list
the elements at current positions k..s-1 must be moved toward the end of the array
C. the elements at current positions k..s must be moved toward the end of the array
the element at position k is overwritten
Rate this question:
Is the number of bytes of memory that the list can hold
Is the number of elements that are currently stored in the list
Is the length of its internal array
None of these
Rate this question:
You can use array subscript notation to work with the ArrayList
it is implemented as a class that uses an internal array to hold the elements of the list
You can pass it as a parameter to any method that expects an array
All of these
Rate this question:
an ArrayList uses a LinkedList to hold its elements, an array does not.
An array keeps track of its length while an ArrayList does not track comparable information
C. arrays have a fixed size and cannot grow to accommodate more elements
D. All of these
Rate this question:
The index passed to it is negative
The index passed to it non negative
The index passed to it is negative or greater or equal to the size of the list
The index passed to is negative or greater than the size of the list
Rate this question:
Is the number of bytes of memory that the list can hold
is the number of elements that are currently stored in the list
is the size of its internal array
None of these
Rate this question:
Throws an exception if the element is not found in the list
Uses binary search to locate the element
Uses sequential search to locate the element
Returns 0 if the element is not found in the list
Rate this question:
Quiz Review Timeline (Updated): Aug 29, 2024 +
Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.
Wait!
Here's an interesting quiz for you.