So now it work isn't it? :-)
And you don't need the main class (Game class) to implement the serializable, but the HighScoreList and all class inside it that must implement serializable.
[java] Object Serialization - How Come my Object is Null?
Quote:Original post by Kevinator
I understand now, thank you. And curses to the book that made it sounds as if I only needed my main class to implement the serializable interface. ;)
Likely you just misunderstood it. If a class implements Serializable, subclasses of that class are Serializable also. You must have interpreted the term base class the wrong way. Member objects will be serialized only if they implement the Serilizable interface.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement