Answer Posted / sudhadevi
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 ? | 12 Yes | 2 No |
Post New Answer View All Answers
What purpose do the keywords final, finally, and finalize fulfill?
What is sorting algorithm in java?
When should I use stringbuffer?
Is minecraft java edition free?
What are the differences between graph and tree?
What is a get method?
What two classes are used to read data only?
What is a class component?
Is java call by reference?
What is stack explain?
Why does java have two ways to create child threads? Which way is better?
Write a code to show a static variable?
What is the final field modifier?
What is string buffer?
What is integer parseint?