일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- python
- endl
- font weight
- Euler
- 연결리스트
- Notting hill
- unreal engine4
- Unreal
- codecademy
- Java
- bool
- 파이선
- html
- 알고리즘
- CSS
- dictation
- for
- html5
- Project
- cow
- cout
- 영알남
- if
- 코딩도장
- 파이썬
- std
- UE4
- C++
- Bull
- Polymorphism
Archives
- Today
- Total
목록Bonus (1)
polymorphism (다형성) Example
package javafuture; import javafx.scene.Parent; public class Example { public static void main(String[] args) { Buyer b=new Buyer(); b.buy(new Tv()); b.buy(new Computer()); System.out.println(b.money); System.out.println(b.bonusPoint); } } class Product{ int price; // product's price int bonusPoint; // membership point when you buy something Product(int price){ this.price=price; this.bonusPoint=..
Programming/Java
2018. 1. 19. 10:02