I was experimenting with toCharArray() and found some strange behavior.
toCharArray()
Suppose private static final char[] HEX_CHARS = \"0123456789abcdef\".toCha
private static final char[] HEX_CHARS = \"0123456789abcdef\".toCha
It is because the parameter to println is different in the two calls.
println
The first parameter is called with char[] and the second is called with a string, where HEX_CHARS is converted with a call to .toString().
char[]
HEX_CHARS
.toString()
The println() have an overriden method that accepts a charArray.
println()