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
  • 534
  • 2
  • 8
  • 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,738
  • 20
  • 78
  • 116