일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- c#
- Github
- Tkinter
- GIT
- Kotlin
- 파이썬
- Python
- Excel
- Mac
- hive
- string
- SQL
- Google Spreadsheet
- array
- gas
- PostgreSQL
- matplotlib
- Redshift
- django
- math
- Apache
- Google Excel
- Java
- PANDAS
- dataframe
- numpy
- list
- PySpark
- google apps script
- Today
- Total
목록interitance (2)
달나라 노트
C#의 class에도 상속(Inheritance)이라는 개념이 있습니다. 상속은 어떤 class를 다른 class에 상속하게되는데 상속이라는 개념을 아주아주 심플하게 설명하면 다음과 같습니다. "내 class에 없는 내용을 다른 class로부터 복사해온다." 다음 코드를 보시죠. using System; public class Dog { public string name = "Dog"; public void hello() { Console.WriteLine("Dog Hello!"); } } public class Cat : Dog { } class MyProgram { static void Main() { Cat test_cat = new Cat(); Console.WriteLine(test_cat.na..
Original source = play.kotlinlang.org/byExample/01_introduction/01_Hello%20world open class Dog { open fun Hello() { println("Hello This is a Dog.") } } class Cat : Dog() { } fun main() { var x = Cat() x.Hello() } -- Result Hello I am Dog. Kotlin도 상속이란 개념이 있습니다. Dog class를 Cat에 상속시키고있습니다. 이것은 Cat : Dog() 처럼 세미콜론을 이용하여 가능합니다. main 함수 부분을 보면 x는 Cat class를 이용하여 객체가 되고 있습니다. Cat class는 아무 내용이 없었고 원래..