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
Can classes declared using the abstract keyword cab be instantiated?
What is oops in java?
What does arrays sort do in java?
Why we override equals() method?
How does hashset work in java?
What is the length of a string?
Explain about field hiding in java?
What is initial size of arraylist in java?
How do you replace a string in java?
Can we create object of static class?
What is xslt in java?
How can you traverse a linked list in java?
Explain about fail safe iterators in java?
is there a separate stack for each thread in java? : Java thread
What are loops in java? What are three types of loops?