class IntListElement{ int data; /* Pointer to the next node. */ IntListElement next = null; IntListElement(int d){data = d;} IntListElement(int d, IntListElement ln){ data = d; next = ln; } public String toString(){ return ""+data; } /* The following methods are only needed if * attributes are private. */ void store(int d){data = d;} void store(IntListElement ln){next = ln;} int getData(){return data;} IntListElement getNext(){return next;} }