移动端

  • 题王微信公众号

    题王微信公众号

    微信搜“题王网”真题密题、最新资讯、考试攻略、轻松拿下考试

单选题

1. import java.io.*;  2. public class Foo implements Serializable {  3. public int x, y;  4. public Foo( int x, int y) { this.x = x; this.y = y; }  5.  6. private void writeObject( ObjectOutputStream s)  7. throws IOException {  8. s.writeInt(x); s.writeInt(y)  9. }  10.  11. private void readObject( ObjectInputStream s)  12. throws IOException, ClassNotFoundException {  13.  14. // insert code here  15.  16. }  17. }  Which code, inserted at line 14, will allow this class to correctly serialize and deserialize?() 

发布日期:2021-08-27

1. import java.io.*;  2. public class Foo implemen...
A

s.defaultReadObject();

B

this = s.defaultReadObject();

C

y = s.readInt(); x = s.readInt();

D

x = s.readInt(); y = s.readInt();

标签: "暂无标签"

题王网让考试变得更简单

扫码关注题王,更多免费功能准备上线!