在你的student类中右键
重写tostring方法 再次打印就好了
你要在Student类里面重写toString方法,再运行就正常了。
toString方法里面返回什么,打印就输出什么,如果没有toString方法就是返回内存地址。