Part of Collections Framework
The Example for the Set interface which impliments the TreeSet class ia as-
SetDemo.java
package devmanuals.com;
import java.util.*;
public class SetDemo {
public static void main(String[] args) {
Set st = new TreeSet();
st.add("Gyan");
st.add("Rohit");
st.add("Anand");
st.add("Arunesh");
Iterator itr = st.iterator();
while (itr.hasNext()) {
String str = (String) itr.next();
System.out.println("Name :" + str);
}
}
}
- List
- Queue
- Deque
- Map
- SortedSet
- SortedMap
- NavigableSet
- NavigableMap
- BlockingQueue
- BlockingDeque
- ConcurrentMap
- ConcurrentNavigableMap
-
-
-
Posted in :
Java
Posted on :
November 23, 2010 at 6:08 PM
Comments :
[ 0 ]
Java Collections Framework
To handle collection of objects, Java collection API offers us classes and
interfaces. Collection is similar to array except that they have advance
features and can change their size dynamically. This tutorial covers almost all
the topics of collection with it's complete list of examples. This tutorial also
contain various implementation of the collection.
This easy and complete demonstration ,with example, guide you to understand the
collection more efficiently. After completing this tutorial you will be
proficient enough to implement it in your code.
Things to know in advance
You must be familiar with basic oops concept to understand this tutorial more
conveniently.
Software requirement
At least JDK 1.3 because collection is added after JDK 1.2 but we recommend
you use latest version whatever available to you.
Given below the tutorial's complete list :
Part of Collections Framework
General-Purpose Implementations -
Legacy Implementations -
Special Purpose Implementations
Concurrent Implementations
Abstract Implementations
Iterators
Ordering
Array Utilities
-
visit
ReplyDeletehttp://www.javaproficiency.com/2015/05/java-collections-framework-tutorials.html
Thanks Sharing Nice article .There is also good nice Java Collection Framework Tutorials
ReplyDelete