Q. Which of these is a correct way to create an ArrayList?
Solution:
Both ArrayList list = new ArrayList(); and List list = new ArrayList(); are valid declarations.
Get Question Bank
Strengthen Your Practice with our comprehensive question bank.
Both ArrayList list = new ArrayList(); and List list = new ArrayList(); are valid declarations.
Strengthen Your Practice with our comprehensive question bank.