Forums Java Help What are Transient and Volatile Modifiers

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #7157
    Aakanksha
    Participant

    What are Transient and Volatile Modifiers?

    #11849
    Aakanksha
    Participant

    Transient: The transient modifier applies to variables only and it is not stored as part of its object’s 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.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.