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

 
 

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

Consider a sample code:

1    import java.io.*;
     
2    class Student implements Serializable {
3  
4    public Integer rollno;
5    public String address;
6    public transient int ccode;
}

What will be the effect of line no-6 ? Choose the correct option?

(A) A transient variable is a variable that are not serialized.
(B) A transient variable is a variable that are only serialized.

Answer:

(A)

Advertisement

Related Tags for SCJP Module-11 Question-5:


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