Most likely because it was designed all around writing to character streams.
System.out
is a PrintStream
which delegate writes to a BufferedWriter
which in turn is instance of Writer
.
some Writer
possibilities
void write(char[] cbuf)
abstract void write(char[] cbuf, int off, int len)
void write(int c)
void write(String str)
void write(String str, int off, int len)
Because of that mostly every void print(..)
method in PrintStream
uses String.valueOf()
to be able to pass it over to writer
and say writer.write(s)
This was noticed and proposed to implement toString
in arrays
https://bugs.openjdk.java.net/browse/JDK-4168079, but obviously it was too late, due to compatibility/stability concerns. So the decision was to Implement helper methods to accomplish the same thing.
So now you may find a lot of
System.out.println(Arrays.toString(new int[]{1,2,3}))