0

Can someone explain me real world example of in which situation i can use transient modifier in Java ? I absolutely don't understand its use so far for me ?

public transient int a= 55; 
public int a= 55; 
user3398326
  • 514
  • 2
  • 6
  • 25

1 Answers1

1

during serialization if you do not want to store any variable then you can declare that using transient keyword

SpringLearner
  • 13,546
  • 20
  • 71
  • 113