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
Can we override singleton class?
What is difference between final and immutable?
What is the purpose of declaring a variable as final?
What is default switch case? Give example.
how we can use debug in myeclipse 6.0 in order solve the problems that exist in our program when there are 900 to 1000 pages in a web application
How do you write a scanner class in java?
What does indexof mean?
What is ++ a in java?
What does exp mean in math?
What are the parts of methodology?
What are the three types of design patterns?
What is the main use of generics in java?
Can we sort array in java?
How to stop a thread in java? Explain about sleep () method in a thread?
Is oracle java 11 free?