posted 17 years ago
"here object of type class will create on heap and p is a refrence
now when we write
objs.writeObject(p) in this case what will written to a file either object or refrence.
"
It writes the object to the file. Serialization means, storing the object into persistent storage area.
For your first doubt, here is my understanding,
- Serialization is writing the object to the ObjectOutputStream.
- Writing to file is actually putting ObjectOutputStream containing object state to a file on the storage media.
Anybody, pl. correct me if I am wrong.
surya.
Sai Surya, SCJP 5.0, SCWCD 5.0, IBM 833 834
http://sai-surya-talk.blogspot.com, I believe in Murphy's law.