Category Archive for "Tostring"

What's the simplest way to print a Java array?

In Java, arrays don't override toString(), so if you try to print one directly, you get the className + '@' + the hex of the hashCode of the array, as defined by Object.toString():...

How to Print a Java Object Without Getting "SomeType@2f92e0f4"

When printing a Java object using the System.out.println() method, you might have encountered the output SomeType@2f92e0f4. This is the def...