I have a question on serialization. If my class has private variables and there are no getters and setters, then how will the value of these variables be read by the Serializat
The Serialization API doesn't worry about private variables. Its purpose is to convert your object to a binary representation in a file or some other kind of storage that can be reconstructed later.