LinkedListExample.java
import java.util.LinkedList; /* * Example of add(E e) method. */ public class LinkedListExample { public static void main( String[] args ) { LinkedList<Integer> linkedList = new LinkedList<Integer>(); /* * Appends the specified element to the end of this list. */ linkedList.add(100); linkedList.add(200); linkedList.add(300); linkedList.add(400); System.out.println("linkedList : "+linkedList); } }
linkedList : [100, 200, 300, 400]
https://sites.google.com/site/javaee4321/java-collections/LinkedListDemoAdd.zip?attredirects=0&d=1
See also:
No comments:
Post a Comment