public class icell implements java.io.Serializable { int head; // data icell tail; // pointer to next cell. public icell(int h, icell t) { head=h; tail =t; } public String toString() { String s = ""; for (icell i=this; i!=null; i=i.tail) s = s + i.head + " "; return s; } } // icell l = new cell(2,new cell(3,new cell(5,null)));