Answer Posted / pasindu
Trsnsient:
If you mark an instance variable as transient you're telling
the JVM to skip this variable when you attempt to serialize
the object containing it.
Volatile:
The volatile modifier tells the JVM that a thread accessing
the variable must always reconcile its own private copy of
the variable with the master copy in memory.
It can be apply only to instance variables.
Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
Why synchronization is important?
What are different data types?
can used Protected Class outside Function.?
What is the difference between overriding and overloading in OOPS.
What is the use of default method in interface in java? Explain
What is the byte order of byte buffer?
Can we declare an interface as final?
What is the difference between choice and list?
Can java cast null?
Give example to differentiate between call by value and call by reference.
What type of value does sizeof return?
What is identifier give example?
Can we clone singleton class in java?
What is the difference between class forname and new?
What is bufferedreader in java?