Suppose 'sample' is the class name,then the syntax is as follows
FileOutputStream out = new FileOutputStream("sample.txt"
ObjectOutputStream oout = new ObjectOutputStream(out
oout.writeObject(object3
oout.flush(
ObjectInputStream ois = new ObjectInputStream(new FileInputStream("sample.txt")
sample object5 = (sample) ois.readObject(
How object can be created using newinstance() in java?
How object can be created using clone() in java?
How object can be created using Class.forName()in java?
What is the difference between class and object in java?
How object can be created using new keyword in java?