Showing posts with label Collection. Show all posts
Showing posts with label Collection. Show all posts
Wednesday, 28 October 2015
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiydwR0wj_sJFXT47bvWBHUt5CnqSeoF7qqQDEd3VXoA3FP-zfJgHGtenz__QarmLINiiA6U0F0XXsn2KOCe15HerLuv4CCLKXXAU3DVDfflP9FmOP4qkSTC9sPtcO6KdiOkE2tWnPZk4o/s1600/arraylist.png)
We all know in java ArrayList does not have limit unlike Array where we can only add fixed number of elements.
ArrayList allows dynamically adding and removing the elements in this list. So question comes HOW?
By default initial capacity of an array is defined with constant DEFAULT_CAPACITY
private...
Monday, 26 October 2015
In most of the interviews of Java, We are often checked with the in depth knowledge of Collection APIs and its capabilities.
One of the very famous interview questions is: Why Set does not allow duplicate value?
Now, don’t tell me you were also asked the same
We all know Set theory in mathematics that all elements in Set are always unique. The same has been applied to the Set API. Let’s try to...
Subscribe to:
Posts (Atom)