Question: Suppose you have declared an ArrayList of Integers named numbers with a capacity of 10, and that you have assigned values to the first six
Suppose you have declared an ArrayList of Integers named numbers with a capacity of 10, and that you have assigned values to the first six elements. Which of the following is not legal?
a. Numbers.get(9);
b. Numbers.set(1, 55);
c. Numbers.get(5);
d. Numbers.add(77);
Step by Step Solution
3.38 Rating (154 Votes )
There are 3 Steps involved in it
a If six elements in an Array List have been as... View full answer
Get step-by-step solutions from verified subject matter experts
