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: