program 13B
This commit is contained in:
BIN
Screenshots/program13B.png
Normal file
BIN
Screenshots/program13B.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.1 KiB |
15
TestJavaCollection2.java
Normal file
15
TestJavaCollection2.java
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
// 13B
|
||||||
|
import java.util.*;
|
||||||
|
public class TestJavaColection2 {
|
||||||
|
public static void main(String args[]){
|
||||||
|
LinkedList<String> al = new LinkedList<>();
|
||||||
|
al.add("Ravi");
|
||||||
|
al.add("Vijay");
|
||||||
|
al.add("Ravi");
|
||||||
|
al.add("Ajay");
|
||||||
|
Iterator<String> itr = al.iterator();
|
||||||
|
while(itr.hasNext()){
|
||||||
|
System.out.println(itr.next());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user