Kod:
import java.util.LinkedList;
import java.util.Iterator;
 
 
public class LİST {
 public static void main(String args[]){
 
      String s1="bir";
      String s2="iki";
      String s3="üç";
      String s4="dört";
      String s5="bes";
 
    LinkedList a=new LinkedList();
 
     a.add(s1);
     a.add(s2);
     a.addFirst(s3);//**basa ekle
     a.addLast(s4);//**sona ekle
     a.addFirst(s5);
 
 
     Iterator Iterator=a.listIterator();
 
     while(Iterator.hasNext()){
         System.out.println("->"+Iterator.next());
     }
 
     
     
 
 
 }
}