What is the need of transient variables in Java ?



What is the need of transient variables in Java ?..

Answer / Jitendra C Kanaujia

Transient variables are used in Java to prevent certain fields from being serialized (i.e., written to a file or sent over a network). This can be useful for fields that should not be persisted, such as volatile instance variables that change frequently, temporary data, or sensitive data like passwords.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

watz the difference between abstract class and interface? Which one u ill choose as a designer?

1 Answers   Sonata,


What are selection structures?

1 Answers  


Which package is used for pattern matching with regular expressions?

1 Answers  


Which software is used for java programming?

1 Answers  


Which is faster set or list in java?

1 Answers  


What do you mean by boolean?

1 Answers  


What are the basics of core java?

1 Answers  


Explain the inheritance?

1 Answers  


How does multithreading take place on a computer with a single cpu?

1 Answers  


What is the use of arraylist in java?

1 Answers  


What is difference between static class and normal class?

1 Answers  


What is difference in between java class and bean?

1 Answers  


Categories