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.
About Question enthuware.ocpjp.v7.2.1389 :
Moderators: Site Manager, fjwalraven
-
- Posts: 53
- Joined: Fri Sep 20, 2013 7:20 am
- Contact:
-
- Posts: 33
- Joined: Mon May 06, 2013 9:41 am
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1389 :
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
-
- Site Admin
- Posts: 10389
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1389 :
You are right. That's a typo. If you write using writeInt, you should use readInt to read. Fixed.
thank you for your feedback!
thank you for your feedback!
Who is online
Users browsing this forum: No registered users and 7 guests