class IntListElement{ int data; /* Pointer to the next node. */ IntListElement next = null; /* Constructor Methods */ IntListElement(int d){data = d;} IntListElement(int d, IntListElement ln){ data = d; next = ln; } /* Methods */ public String toString(){ return ""+data; } /* In practice the attributes should be declared * private, and access should be granted by providing * methods. */ }