Collection Framework Interview Questions
For the post of Senior Java Developer Collection framework questions are most common questions which are asked in interviews. In this post I am going to cover all important and most repeated collection framework questions. Lets get started. Q. What is the Collection framework in Java? Collection Framework consist of classes and interface, which are used to store and manipulate the data in the form of objects. It provides various classes such as ArrayList, LinkedList, Vector, Stack, and HashSet, etc. and interfaces such as List, Queue, Set, etc. for this purpose. Collections are growable in nature. i.e. Based on our requirement we can increase or Decrease the size. Collections can hold both homogeneous & Heterogeneous elements. Every Collection class is implemented based on some standard data structure. Q. Arrays Vs Collections? Arrays are always of fixed size, i.e., a user can not increase or decrease the length of the array according to their requi...