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
What are predefined functions?
What is the role of the java.rmi.naming class?
What is ‘has a’’ relationship in java?
Is map ordered in java?
Is string passed by reference in java?
What are the library functions in java?
What happens if an exception is throws from an object's constructor?
What happens when I use / and % with a negative numerator?
What does || || mean in math?
What is meant by 'bit masking' in java?
What is string subsequence method?
What are the types of web technologies?
Explain java thread life cycle.
Can inner class extend any class?
What is string [] args?