Page 1 of 1

About Question enthuware.ocpjp.v7.2.1389 :

Posted: Fri Sep 27, 2013 10:53 am
by Student
Hi,
I just found out that native arrays are Serializable in Java; maybe it might be worth mentioning that in the answer, because otherwise some people might think (as I did) that you would need to use an ArrayList rather than a native array, when you don't.
Just a thought.

Cheers.

Re: About Question enthuware.ocpjp.v7.2.1389 :

Posted: Fri Apr 18, 2014 3:59 am
by bptoth
I played around some with the explanation code, and it seemed to me that using writeObject() and readInt() respectively for bonds.length results in a java.io.EOFException during the read. Using write()/read() or writeInt()/readInt() seems to solve the issue

Re: About Question enthuware.ocpjp.v7.2.1389 :

Posted: Fri Apr 18, 2014 6:27 am
by admin
You are right. That's a typo. If you write using writeInt, you should use readInt to read. Fixed.
thank you for your feedback!