Import java. Io .*;
Interface access {
Void DIS ();
}
Public class test implements access, serializable
{
String indicate;
String schedule;
Public test ()
{
Indicate = "I am a hero ";
Schedule = "Diligent is right ";
}
Public test (string parameter1, string parameter2)
{
Indicate = parameter1;
Schedule = parameter2;
}
Public void DIS ()
{
System. Out. Print ("The displayis" + indicate + Schedule );
}
Public static void main (string [] ARGs)
{
Test fobject = new test ("Hero is me", "comeon ");
Fobject. Dis ();
}
}
Import java. Io .*;
Public class Popo implements serializable
{
String name;
Access demo;
Public Popo ()
{
Name = "Zhouzhou ";
Demo = new test ();
// Demo = "Shuangshuang ";
}
Public static void main (string [] atgs) throws exception
{
Popo pp = new Popo ();
Fileoutputstream fo = new fileoutputstream ("a.txt ");
Objectoutputstream oo = new objectoutputstream (FO );
OO. writeobject (PP );
OO. Close ();
}
}