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.
(A)
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.