class A{ }
class B entends A{ }
A a = new A();
B b = new B();
a =b
A a = new A(); B b = new B(); a =b | 한줄로 바꾸면 A a = new B(); |
'기초 > JAVA' 카테고리의 다른 글
java 그림 그리기 (0) | 2011.06.13 |
---|---|
시퀀스사용할때 입력방법 (0) | 2011.06.08 |
String Class 의 객체 생성 (0) | 2011.05.25 |
static 변수 (0) | 2011.05.25 |
생성자 오버로딩 (0) | 2011.05.18 |