1.

Which of these class object can be used to form a dynamic array?(a) ArrayList(b) Map(c) Vector(d) ArrayList & VectorThis question was posed to me in an interview for job.I'm obligated to ask this question of Java.util in portion java.util – The Collections Framework of Java

Answer»

The correct choice is (d) ArrayList & Vector

Easy explanation: Vectors are dynamic arrays, it contains MANY legacy METHODS that are not part of collection FRAMEWORK, and hence these methods are not present in ArrayList. But both are USED to FORM dynamic arrays.



Discussion

No Comment Found

Related InterviewSolutions