why to use transient variables when static variables can be
used for Serialization

Answer Posted / priyanjan

static variables can also serialized but is a very
cumbersome process. Transient keyword prefixing any
variable states that the varible does serialized but its
state i.e. value of the varible, does not serialize.

Is This Answer Correct ?    10 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is arguments in java?

524


what is optional in java 8?

564


Explain yield() method in thread class ?

622


What is the difference between scrollbar and scrollpane?

612


Is array an object in java?

556






Is age a discrete variable?

528


What is an infinite loop in java? Explain with an example.

588


What are memory tables?

612


What is Enum in Java?

686


Will set allow duplicates in java?

504


How do I get a substring?

529


What is a java developer salary?

547


What is a void method?

519


Explain notifyall() method of object class ?

669


Is c better than java?

547