package
linklist_insert;
import java.util.*;
/**
*
* @author Compaq
*/
public class Main {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
System.out.println("LinkedList");
LinkedList List=new LinkedList();
int a=3, b=5, c=9, d=11;
int size;
List.add(a);
List.add(b);
List.add(c);
List.add(d);
System.out.print("Sebelum di insert"+List);
System.out.print("\n insert 7");
int e=7;
List.add(2, e);
System.out.println("\nsetelah di urutkan"+List);
}
}
import java.util.*;
/**
*
* @author Compaq
*/
public class Main {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
System.out.println("LinkedList");
LinkedList List=new LinkedList();
int a=3, b=5, c=9, d=11;
int size;
List.add(a);
List.add(b);
List.add(c);
List.add(d);
System.out.print("Sebelum di insert"+List);
System.out.print("\n insert 7");
int e=7;
List.add(2, e);
System.out.println("\nsetelah di urutkan"+List);
}
}
0 Response to "example linked list (insert) "
Post a Comment