Upgrade to Pro — share decks privately, control downloads, hide ads and more …

kotlin season 1 - Part 7 Class - 1

TaeHwan
October 11, 2016

kotlin season 1 - Part 7 Class - 1

2016년 유데미 Kotlin 강의를 공개합니다.

영상 : https://www.youtube.com/watch?v=8qkQmqz529g

2회 분은 유데미에서 확인 가능합니다.
http://bit.ly/2UpaJUR

TaeHwan

October 11, 2016
Tweet

More Decks by TaeHwan

Other Decks in Education

Transcript

  1. Part 7 Kotlin Class - 1 Taehwan 1 ରࣁ؀ উ٘۽੉٘

    ѐߊ ঱য ௏ౣܽ, द੘ೞӝ thdev.tech, 2016
  2. য়ט਷ • Kotlin੄ ӝࠄ ௿ېझ • ࢤࢿ੗ • ׮઺ ࢤࢿ੗

    • ࢤࢿ੗ ୡӝച • ࢤࢿ੗ private • ௿ېझ ࢎਊೞӝ 2 ରࣁ؀ উ٘۽੉٘ ѐߊ ঱য ௏ౣܽ, द੘ೞӝ thdev.tech, 2016
  3. class - java public class ClassName { // class ҳഅ

    } 5 ରࣁ؀ উ٘۽੉٘ ѐߊ ঱য ௏ౣܽ, द੘ೞӝ thdev.tech, 2016
  4. class - kotlin class ClassName { // class ҳഅ }

    6 ରࣁ؀ উ٘۽੉٘ ѐߊ ঱য ௏ౣܽ, द੘ೞӝ thdev.tech, 2016
  5. class - kotlin • ઺Қഐ ࢤۚೞӝ class ClassName 7 ରࣁ؀

    উ٘۽੉٘ ѐߊ ঱য ௏ౣܽ, द੘ೞӝ thdev.tech, 2016
  6. ࢤࢿ੗ - java public class ClassName { public ClassName(String name)

    { // ... } } 9 ରࣁ؀ উ٘۽੉٘ ѐߊ ঱য ௏ౣܽ, द੘ೞӝ thdev.tech, 2016
  7. ࢤࢿ੗ - kotlin class ClassName(val name: String) { // ...

    } 10 ରࣁ؀ উ٘۽੉٘ ѐߊ ঱য ௏ౣܽ, द੘ೞӝ thdev.tech, 2016
  8. ࢤࢿ੗ - kotlin class ௿ېझ੉ܴ(val/var ߸ࣻ੉ܴ: ߸ࣻ Type) {} class

    ClassName(val name: String) { // ... } 11 ରࣁ؀ উ٘۽੉٘ ѐߊ ঱য ௏ౣܽ, द੘ೞӝ thdev.tech, 2016
  9. ࢤࢿ੗ - kotlin • ࢤࢿ੗੄ ೣࣻ ਗഋ • constructor਷ ࢤۚ

    оמ class ClassName constructor(val name: String) {} 12 ରࣁ؀ উ٘۽੉٘ ѐߊ ঱য ௏ౣܽ, द੘ೞӝ thdev.tech, 2016
  10. ׮઺ ࢤࢿ੗ - java public class ClassName { public ClassName(String

    name) { // ... } public ClassName(String name, int age) { this(name); // ... } } 14 ରࣁ؀ উ٘۽੉٘ ѐߊ ঱য ௏ౣܽ, द੘ೞӝ thdev.tech, 2016
  11. ׮઺ ࢤࢿ੗ - kotlin class ClassName(val name: String) { constructor(name:

    String, age: Int) : this(name) { // ... } } • ageীח ੽Ӕ੉ ࠛоמ 15 ରࣁ؀ উ٘۽੉٘ ѐߊ ঱য ௏ౣܽ, द੘ೞӝ thdev.tech, 2016
  12. ׮઺ ࢤࢿ੗ - kotlin class ClassName(val name: String, val age:

    Int) { constructor(name: String) : this(name, 0) { // ... } } 16 ରࣁ؀ উ٘۽੉٘ ѐߊ ঱য ௏ౣܽ, द੘ೞӝ thdev.tech, 2016
  13. ࢤࢿ੗ ୡӝച - java public class ClassName { private String

    name; // ࢤࢿ੗ ୡӝച public ClassName() { name = "ClassName"; } } 18 ରࣁ؀ উ٘۽੉٘ ѐߊ ঱য ௏ౣܽ, द੘ೞӝ thdev.tech, 2016
  14. ࢤࢿ੗ ୡӝച - kotlin class ClassName { private val name:

    String // ࢤࢿ੗ ୡӝച ࠶۾ init { name = "ClassName" } } 19 ରࣁ؀ উ٘۽੉٘ ѐߊ ঱য ௏ౣܽ, द੘ೞӝ thdev.tech, 2016
  15. private ࢤࢿ੗ - java class ClassName { private ClassName() {

    // ... } } 21 ରࣁ؀ উ٘۽੉٘ ѐߊ ঱য ௏ౣܽ, द੘ೞӝ thdev.tech, 2016
  16. private ࢤࢿ੗ - kotlin class ClassName private constructor() { //

    ... } 22 ରࣁ؀ উ٘۽੉٘ ѐߊ ঱য ௏ౣܽ, द੘ೞӝ thdev.tech, 2016
  17. ௿ېझ ࢎਊೞӝ - java public class ClassName { // ...

    } ClassName className = new ClassName(); 24 ରࣁ؀ উ٘۽੉٘ ѐߊ ঱য ௏ౣܽ, द੘ೞӝ thdev.tech, 2016
  18. ௿ېझ ࢎਊೞӝ - kotlin class ClassName { // ... }

    // kotlinীࢲ val className: ClassName = ClassName() 25 ରࣁ؀ উ٘۽੉٘ ѐߊ ঱য ௏ౣܽ, द੘ೞӝ thdev.tech, 2016
  19. ׮਺਷ • Kotlin੄ class ࢓ಝࠁӝ 2ߣ૩ • abstract/interface 27 ରࣁ؀

    উ٘۽੉٘ ѐߊ ঱য ௏ౣܽ, द੘ೞӝ thdev.tech, 2016