标签:java private class override pre code out print ring
class student { private String name="zhang"; private int num=12; @Override public String toString() { return "名字为:" + name +","+ "学号为:" + num; } } public class Main { public static void main(String[] args) { student stu = new student(); System.out.println(stu); } }
标签:java private class override pre code out print ring
原文地址:https://www.cnblogs.com/z2529827226/p/11638409.html