What are Transient and Volatile Modifiers?
Answer Posted / janet
Transient: The transient modifier applies to variable only
and it is not stored as part of it's objects persistent
state.Transient variables are not serialized.
Volatile: Volatile modifier applies to variables only and
it tells the compiler that the variable modified by
volatile can be changed unexpectedly by other parts of the
program.
| Is This Answer Correct ? | 22 Yes | 4 No |
Post New Answer View All Answers
What is the differences between c++ and java? Explain
What exceptions occur during serialization?
Can we write a class without main method in java?
What do you mean by local variable and instance variable?
What does @param args mean in java?
What is static variable with example?
What do you mean by of string::valueof expression in java 8?
What is an infinite loop in java? Explain with an example.
How thread scheduler schedule the task?
What is meant by class?
Why null value is used in string?
How can you make sure that your singleton class will always return single instance in multi-threaded environment?
Why is core java important?
Is special character in java?
How strings are created in java?