// Use the List class import java.util.Scanner; class ListDemo { public static void main(String[] args) { Scanner input=new Scanner(System.in); int a, b; a = input.nextInt(); // 15 b = input.nextInt(); // 9 List z = new List(); z.Insert(a); z.Insert(b); z.Print(); // 15 9 z.Insert(77); z.Print(); // 15 9 77 /* if(z.IsPresent(77)) System.out.println("Found it."); else System.out.println("Not found it."); */ z.SelSort(); System.out.println("\nAfter sorting - \n"); z.Print(); } }