1. Object类的hashCode()方法,如下: public int hashCode():返回该对象的哈希码值,这个值和地址值有关,但是不是实际地址值(哈希码值是根据实际地址值转化过来的整数值),你可以理解为地址值. 2. Object类的getClass()方法,如下: public final Class getClass():返回此 Object 的运行时类(返回的类型是Class类,实际返回的是Class类的对象实体) Cl…
1. Object类的toString()方法: public String toString():返回该对象的字符串表示 2. 案例演示: (1)Student类: package cn.itcast_02; public class Student { private String name; private int age; public Student() { super(); } public Student(String name, int age) { super(); thi…