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 is a predicate method?
What is the purpose of the main method?
Difference between linkedlist and arraylist.
How can you share data between two thread in Java?
What is the difference between comparison done by equals method and == operator?
How strings are created in java?
How do you convert string to int in java?
What is math in java?
How many types of interfaces are there?
Discuss about garbage collector in Java.
What is generics in java interview questions?
How many types of constructors are used in java?
Why java applets are more useful for intranets as compared to internet?
What are the basic interfaces of java collections framework?
How many bits is a 64 bit byte?