class Point{
int x, y;
Point(int x, int y){
this.x = x;
this.y = y;
}
}
public class ObjectEx {
static void print(Object obj) {
System.out.println(obj.getClass());
System.out.println(obj.hashCode());
System.out.println(obj.toString());
System.out.println(obj);
}
public static void main(String[] args) {
Point p = new Point(2, 3);
print(p);
}
}
๊ฒฐ๊ณผ
728x90
๋ฐ์ํ
0