Answer Posted / subrahmanyam
transient
identifies a variable not to be written out when an
instance is serialized (It can'nt be copied to remove
system)
volatile
indicates that the field is used by synchronized threads
and that the compiler should not attempt to perform
optimizations with it.
When more than one thread share a (volatile) data it is
checked every time. Every thread keeps the latest value of
volatile variable
Is This Answer Correct ? | 30 Yes | 4 No |
Post New Answer View All Answers
What do you mean by default constructor in java?
What are the basics of core java?
Where is singleton pattern used?
What are the supported platforms by java programming language?
Can keyword be used as identifier?
What is the significance of continue jump statement? Explain with an example.
What is var keyword ?
What is memory leak and how does java handle it?
What is the advantage of OOP in java?
What is the default access specifier for variables and methods of a class?
Does java list allow null?
Why java is not 100% object-oriented?
What is the Concept of Encapsulation in OOPS
What are different types of expressions?
What causes memory leak in java?