AssumingthattheserializeBanana2()andthedeserializeBanana2()methodswillcorrectlyuseJavaserializationandgiven:
importjava.io.*;
classFood{Food(){System.out.print(”1”);}}
classFruitextendsFoodimplementsSerializable{
Fruit(){System.out.print(”2”);}}
publicclassBanana2extendsFruit{intsize=42;
publicstaticvoidmain(String[]args){
Banana2b=newBanana2();
b.serializeBanana2(b);//assumecorrectserialization
b=b.deserializeBanana2(b);//assumecorrect
System.out.println(”restored+b.size+);}
//moreBanana2methods
}
Whatistheresult?()