标签:int pre static blog style 技术分享 pack images cheng
1:toString();
只是简单的列出对象的状态(也就是重要的实例变量的当前值)。
package jicheng;
public class Animal { public static void main(String[] args) { Animal a=new Animal(); System.out.println(a); } }
输出结果:
重写
标签:int pre static blog style 技术分享 pack images cheng
原文地址:http://www.cnblogs.com/bulrush/p/7419609.html