Howdy ranchers,
and thank you, Cat, for changing your display name.
Welcome to the ranch!
To your question:
You have to write the two ints seperately. And read it seperately.
When you make the private void writeObject(ObjectOutputStream os) - method and the complementary readObject method, you have to be sure to do this in the right sequence.
Here is an example where I mixed it up (bold):
output:
[Bird with 2 legs and 2 wings, Fly with 6 legs and 2 wings]
null
[Bird with 2 legs and 2 wings, Fly with 2 legs and 6 wings]
Hope that helped.
Yours,
Bu.