Posts

Showing posts from November 19, 2010

List Interface

List Interface : "List interface is used for storing element as a sequence. It means List maintain the sequence according to inserted order. List interface extends the Collection interface. List maintains the index of all elements. So you can insert and retrieve elements by their index. Keep in mind that list may contain duplicate elements. ..." Read Full About click on List Interface

List Interface

List Interface –             List interface is used for storing element as a sequence.  It means List maintain the sequence according to inserted order. List interface extends the Collection interface. List maintains the index of all elements. So you can insert and retrieve elements by their index.             Keep in mind that list may contain duplicate elements.             List interface has its own methods which described below – void add(int index, Object obj) –             This method is used for insert element at given position into the List. Element which is already exist on the given index automatically shifted up. boolean addAll(int index, Collection c) –             This method adds all the object of ...

Set Interface

Java collections framework: Set Interface : "Set is very important when you want to collect unique elements. Set is follows the mathematical fundamental of Set. Set Interface can contains one null value also. But some implementation classes are not allowed the null value...." Read More Articles    click on this link.

Set Interface

Set Interface -       Set is very important when you want to collect unique elements. Set is follows the mathematical  fundamental of Set. Set Interface can contains one null value also. But some implementation classes are not allowed the null value.     Set is not permitted two elements if both are equals. When any element is being added in set internally it check the element is already exist or not through equals and hashcode method. So Set override  equals and hashcode both method.     Set has no extra method. It extends Collection interface. So all method of collection interface is in the Set. But set interface restrict the duplicate elements.    There are some classes which implements the Set Interface. 1.AbstractSet 2.ConcurrentSkipListSet 3.CopyOnWriteArraySet 4.EnumSet 5.HashSet 6.JobStateReasons 7.LinkedHashSet 8.TreeSet               ...

Recent Post

Recent Posts Widget