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 are runtime exceptions?
What is the use of jtable?
What is the most important feature of java? What is an interface?
What is polymorphism and what are the types of it?
I want my class to be developed in such a way that no other class (even derived class) can create its objects. Define how can I do so?
What is string args [] in java?
What is your platform’s default character encoding?
What is the difference between a switch statement and an if statement?
How to create com object in Java?
What are methods in java?
Can we override static methods in java?
Explain different types of thread priorities ?
State differences between C and Java?
why Interface used?
What is an example of declaration?