public class YK1 {
public static void main(String[] argv){ // a class method which can be called by JVM
int[] mydata = {5,9,1,3,7,11,2,8};
OrderedList ol = new OrderedList(mydata);// create a OrderedList object by the constructor with one argument
//ol is a reference to an OrderedList object, not an object itself.
ol.print(); // pass the print messsge to object pointed byol,this will effectly call the prin() method defind in OrderedList.
System.out.println("Smallest number is " + ol.deleteMin());
System.out.println("The next smallest number is "+ol.deleteMin());
ol.print();