Questions for Advanced Object Oriented Programming

1. What is the purpose of delegation in Kotlin, and how does it differ from inheritance?

2. What are inner classes in Kotlin, and how do they differ from nested classes?

3. How does Kotlin implement the multiple inheritance of behavior through interfaces?

4. What is an anonymous inner class in Kotlin, and how is it used?

5. What is property delegation, and how does it simplify property handling in Kotlin?

6. What are companion objects in Kotlin, and how do they compare to static members in Java?

7. How do data classes handle inheritance in Kotlin, and what are the limitations?

8. What is object expression in Kotlin, and how does it differ from object declaration?

9. What are sealed interfaces in Kotlin, and how are they used?

10. What is the difference between inline classes and value classes in Kotlin?

11. How does Kotlin handle covariance and contravariance in generics?

12. What is the difference between a class initializer block and a secondary constructor in Kotlin?

13. What is an open class in Kotlin, and how does it differ from a sealed class?

14. How does Kotlin's `inline` keyword work for classes, and how does it differ from inline functions?

15. What is reflection in Kotlin, and how can it be used to inspect or modify objects at runtime?

16. How does Kotlin handle type erasure with generics, and how can you access type information at runtime?

17. What are destructuring declarations in Kotlin, and how are they related to data classes?

18. How do sealed classes and enums differ, and when should you use each?