first commit
This commit is contained in:
17
TestJavaCollection8c.java
Normal file
17
TestJavaCollection8c.java
Normal file
@@ -0,0 +1,17 @@
|
||||
//WAJ to demo linkedhash set
|
||||
import java.util.*;
|
||||
public class TestJavaCollection8c{
|
||||
public static void main(String args[]){
|
||||
LinkedHashSet<String> set=new LinkedHashSet<String>();
|
||||
set.add("Ravi");
|
||||
set.add("Vijay");
|
||||
set.add(null);
|
||||
set.add("Ravi");
|
||||
set.add("Ajay");
|
||||
|
||||
Iterator<String> itr=set.iterator();
|
||||
while(itr.hasNext()){
|
||||
System.out.println(itr.next());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user