-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { // 자식 클래스 | ||
} | ||
*/ |