Let me put it in this way:
What does JVM understands when it see a class implementing Serializable
What could be the code written to handle this? (If class is Serializable)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You don’t need to serialize (or) save state of every object. It doesn’t make sense. Another reason could be instead of saying, by default, authors might thought let programmer decide. Here is interesting discussion on this from java team.