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
hr interview how many minutes asking question
Write a function for palindrome and factorial and explain?
What is an association?
Can we have more than one package statement in source file ?
Can we override the private methods?
What does nextint () do in java?
How to use arraylist in java netbeans?
What is meant by call by reference?
Can we use this () and super () in a method?
What is object in java?
Is array dynamic in java?
Is null a string or object in java?
How do weakhashmap works?
Define an applet in java?
What is a parameter in a function?