public class SLList { public IntNode first;//create a 64 bits space for first as a type of IntNode
public SLList(int x) {
first = new IntNode(x, null);
}
public void addFirst(int x) {
first = new IntNode(x, first);
}
public static void main(String[] args) {
SLList L = new SLList(10);
L.addFirst(10);
System.out.println(L);
}
}