How to prevent a field from serialization ?

Answers were Sorted based on User's Feedback



How to prevent a field from serialization ?..

Answer / ranganathkini

To prevent a field from being serialized, we have to mark it
with the "transient" keyword

Is This Answer Correct ?    13 Yes 0 No

How to prevent a field from serialization ?..

Answer / ravikiran(aptech mumbai)

by declaring the varable transient

Is This Answer Correct ?    9 Yes 0 No

Post New Answer

More Core Java Interview Questions

What differences exist between iterator and listiterator?

0 Answers  


Are there any tools available in java to create reports?

5 Answers  


What is the purpose of using java.lang.class class?

0 Answers  


What is the argument in java?

0 Answers  


what value will be return by the read() method once it reaches the end-of-file? a. Throws EOException b. Return null c. Return -1 d. Read method return nothing, because it is void method

1 Answers  


Why is static used?

0 Answers  


Why java is secure? Explain.

0 Answers  


Explain in detail about encapsulation with an example?

4 Answers  


What is Major and importance difference between for and foreach loop ?

0 Answers   Infosys,


How do you declare an empty string?

0 Answers  


what is synchronization

3 Answers  


What does n mean in java?

0 Answers  


Categories