题目内容
1.importjava.io.*;
2.publicclassFooimplementsSerializable{
3.publicintx,y;
4.publicFoo(intx,inty){this.x=x;this.y=y;}
5.
6.privatevoidwriteObject(ObjectOutputStreams)
7.throwsIOException{
8.s.writeInt(x);s.writeInt(y)
9.}
10.
11.privatevoidreadObject(ObjectInputStreams)
12.throwsIOException,ClassNotFoundException{
13.
14.//insertcodehere
15.
16.}
17.}
Whichcode,insertedatline14,willallowthisclasstocorrectlyserializeand deserialize?()
查看答案
搜索结果不匹配?点我反馈
更多问题