반응형
Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
Tags
- hive
- Java
- string
- PySpark
- Kotlin
- GIT
- Python
- django
- Google Spreadsheet
- google apps script
- Tkinter
- gas
- Google Excel
- PANDAS
- dataframe
- Redshift
- numpy
- Excel
- array
- Apache
- 파이썬
- Github
- c#
- math
- SQL
- matplotlib
- list
- Presto
- PostgreSQL
Archives
- Today
- Total
목록polymorphism (1)
달나라 노트
Java - Polymorphism
original source = www.w3schools.com 한번 동물의 울음소리를 출력해주는 코드를 작성해봅시다. class Animal { } class Cat extends Animal { } class Lion extends Animal { } class Dog extends Animal { } class Bark { public void bark(Animal animal) { if (animal instanceof Cat) { System.out.println("Cat sounds 야옹."); } else if (animal instanceof Lion) { System.out.println("Lion sounds 어흥."); } else if (animal instanceof Dog) { ..
Java
2021. 3. 14. 21:54