Any ideas on how i could go about deserializing SerObj?
Code:import java.io.*; class SerObj implements Serializable{ transient private int temp; private boolean indicator; public SerObj(int temp, boolean indicator){ this.temp = temp; this.indicator = indicator; } public int getTemp(){ return temp; } public boolean getIndicator(){ return indicator; } } public class X{ public static void main(String[] args){ ObjectOutputStream oup = null; try{ oup = new ObjectOutputStream(new FileOutputStream("C:" + File.separator + "ObjSerFile")); oup.writeObject(new SerObj(68,true)); }catch(IOException io){ System.err.println(io); }finally{ try{ oup.close(); }catch(IOException io){ System.err.println(io); } } } }




Reply With Quote