Hello friends, I am trying to read object from file and want to check equality of data member of reading object with another OBJECT. suppose there is a class Login with serialization with two data members username and password. object L1 is written object in file and object L2 is created in source code. and i want to equate both object. in my programm there is a error java.io.InvalidCastException stream classdesc serialversion id of both objects.