/* In java, all primitive types such as int and double are "serializable". Strings are also serializable. Arrays and objects are serializable if their components are serializable. */ 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; } } // usage: icell l = new cell(2,new cell(3,new cell(5,null)));