You both have a different understand about what the "correct" behavior is. Rikard is correct that the toString() method is working correctly, but Bill is confused because he is expecting different behavior.
First, the toString() method is inherited from Object, so every object always has this method. It is intended to provide some "meaningful representation" of the object's state, but this is highly context-dependant.
The default behaviour in Object is to just print out the name of the object's class, and a reference to that object's pointer/unique identifier in memory.
bytearrayin is a byte[], and inherits Object's toString() method. When you call toString() on an array, you get the name of the object's class, and address/unique identifier for that instance.
This is the correct behavior. If you don't like the default implementation of toString() , you can always write your own (except for an array of course, since you can't create subclasses of array types.)
Bill, the example that Rikard posted last works fine on my machine, so make sure you've copied it exactly and try it again, it should work.
Rob