Me too know there is a google engine which will bring us what we needed in a fraction of seconds. Why I am posting is, since this gorup members will know some good tutoirals(with samples/examples) for beginners than the google which will list from advanced. May be a silly question to post, but the below thing managed to post me..
Any way, thanks for your help. And here goes my second question on serializing/deserializing.
I am first serializied the object state in the file called "hi.ser", then when I tried to desrialized I am getting this error:
import java.io.*;
public class BoxRecover{
public static void main(
String args[]){
Box myBox = new Box();
try{
FileInputStream fi = new FileInputStream("Hi.ser");
ObjectInputStream oi = new ObjectInputStream(fi);
Box width1 = (Box) oi.readObject();
System.out.println("width ::::::::"+myBox.getWidth());
}catch(Exception e){
e.printStackTrace();
}
}
}