We can print an array easily using System.out.println(though array is also a kind of object in java) but why we can't print an object directly without override toString() method?
For example:
int array[]=new int(2);
array[0]=10;
System.out.println(array[0]); //it works
Object obj=new Object();
System.out.println(obj); //it shows the classname and some value i don't know
解决方案
"it shows the classname and some value i don't know"
Well, that's how an Object instance is printed, and for instances of Object class (i.e. not sub-classes of Object) you can't override toString.
For your custom sub-classes of Object, you must decide yourself how you wish the String representation of the object to look like (by overriding toString). Java doesn't decide it for you.