
1.Create a class called ObjectTest. Use the ObjectInputStream and ObjectOutputStream classes to read and write from the file â??obj.txtâ??. Create variables and initialize them with the values to be written to the file. Once it is written, use ObjectInputStream to read those values from the file.

Please visit the following link:
http://www.roseindia.net/tutorial/java/core/files/storeobjectsinFile.html
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.