Home Tutorial Java Scjp Part11 SCJP Module-11 Question-4

 
 

Share on Google+Share on Google+
SCJP Module-11 Question-4
Posted on: July 20, 2010 at 12:00 AM
Advertisement
The Sample program given below will test your knowledge about the Serialization and persistent variable in Java.

Given a sample code:

1    import java.io.*;

2    class Student implements Serializable {
3    // Choose correct option
4    public Integer rollno;
5    public String address;
6    public transient int ccode;
}

What should be placed at line no-3 for appropriate serialVersionUID ? Choose the correct statement?

(A) final long serialVersionUID = any long value;
(B) ANY-ACCESS-MODIFIER static final long serialVersionUID = any long value;
(C) static int serialVersionUID = any integer value;
(D) float serialVersionUID = any float value;

Answer:

(B)

 

Advertisement

Related Tags for SCJP Module-11 Question-4:


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: July 20, 2010

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com