posted 14 years ago
Hi David,
You simply did not correctly implement your customized writeObject() method. If you look closely, you have simply swallowed a letter 't'. VM is using a default method writeObject which does not write your integer value returned by Bulb class method getPower( ). Subsequently, when you try to retrieve the value from a serialized file, readInt( ) method throws IOException.
Pete
The important thing is not to stop questioning.
Albert Einstein