class TV{
private int size;
public TV(int size) { this.size = size; }
protected int getSize() { return size; }
}
[1번] 다음 main() 메소드와 실행 결과를 참고하여
TV를 상속받은 ColorTV 클래스를 작성하라.
public static void main(String[] args) {
ColorTV myTV = new ColorTV(32, 1024);
myTV.printProperty();
}
32인치 1024컬러
class A{
public A(){} //공짜로 만들어줌
}
class SuperCLS {
public SuperCLS () {
System.out.println("I'm Super Class");
}
}
class SubCLS extends SuperCLS {
public SubCLS (){
super();
}
public SubCLS () {
System.out.println("I'm Sub Class");
}
}
class SuperSubCon {
public static void main(String[] args) {
new SubCLS ();
}
}
class A{
}
class B extends A{
}
class A {
public A() {}
}
class B extends A{
public B() {super();}