Which of the following would be best handled with anArrayList?
A. A list of all the states in the United States
B. A list of cars that get 30 miles per gallon or better
C. The names of the Seven Dwarfs
D. A list of the ASCII code values
E. A list of astronauts who have walked on the moon
Answer
Answer : B. A list of cars that get 30 miles per gallonor better
ArrayList is preferred when the size is unknown.. Sohere we are not sure about how many number of cars gets 30 milesper gallon in remaining other cases we are sure about
OR
OR