Student类中public String toString(){return "Student [stuno=" + stuno + ", stuName=" + stuName + ", stuage=" + stuage + "]";}方法重写后,没有执行该方法,但是System.out.println(stu);输出了该方法的返回值,为什么???
public static void main(String[] args) throws Exception{
Student stu=new Student("2334","张三",10);
System.out.println(stu);
}