2. Hi, I am John
- Android Developer
- Work on Rakuten Viki
- Use Kotlin for 2 years
- Linkedin:
https://www.linkedin.com/in/chang-john-0a95237a/
3. Outline
- Preface
- Creating a Subclass
- open correspond to : operator
- open correspond to override
- protected modifier
- polymorphism mechanism
- final
- Type Checking
- type casting(as)
- smart casting(is)
- Any
4. Preface
- Consider purpose of inheritance: shared common code and polymorphism
- It’s more difficult than Java to achieve polymorphism
- It’s more convenient than Java to cast type