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


Please Help Members By Posting Answers For Below Questions

What is binary tree in java?

536


How much ram can a 64 bit processor theoretically?

466


Mention a package that is used for linked list class in java.

529


Does collectionutils isempty check for null?

816


What is method in java ?

628






How do you use compareto in java?

561


Why synchronization is important?

589


How many days will it take to learn java?

519


What is a singleton class in Java?

506


explain local datetime api in java8?

557


What is the difference between comparison done by equals method and == operator?

571


Explain working of call by reference function invoking.

594


You're given a Boolean 2D matrix, can you find the number of islands?

597


Can we assign null to double in java?

549


What is the old name of java?

505