Skip to content

Commit

Permalink
1130
Browse files Browse the repository at this point in the history
  • Loading branch information
minu1215 committed Nov 30, 2023
1 parent dd1afad commit b863281
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions java-project/src/day09_abstract/ex01/MainEntry.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package day09_abstract.ex01;

import day08_inheritance.ex01.Circle;
import day08_inheritance.ex01.Rectangle;

public class MainEntry {
public static void main(String[] args) {
new Rectangle(50, 30).disp();
// Circle c = new Circle();
// c.disp();
new Circle().disp();
new Circle(1,2,3).disp();
// Rectangle object create & print
}
}
/*
> inheritance(상속)
- extends
- 단일 상속만 지원
- super
- 재사용
- 확장
형식>
class Super { // 부모 클래스
}
class Sub extends Super { // 자식 클래스
}
*/

0 comments on commit b863281

Please sign in to comment.