Below are the explanation of activity and fragment lifecycle. Based on some use cases.

Case:0 I am launching activity and adding a fragment in onCreate() of activity so the lifecycle method call stack will be like.

After doing some research I found some questions which can help all of us in our next interview.

This blog will contain mostly kotlin specific questions.

  1. Why Kotlin?(Concise, Null Safety, Interoperable, SmartCast, etc…)
  2. Val &var and const?
  3. String interpolation?
  4. init block?
  5. What is an open keyword where it is used?
  6. What is the extension function in kotlin?
  7. What is infix functions?
  8. What is the data class?
  9. Sealed classes in kotlin?
  10. What is the object keyword in kotlin?
  11. Companion object in kotlin?
  12. Higher-order functions?
  13. function as an expression or conditional statements as an expression?
  14. What are scoping functions like with and apply, let, also?
  15. Null safety operators?
  16. lateinit keyword?
  17. Flat map and Map in kotlin?
  18. Access Modifiers in kotlin?
  19. What is Any?
  20. What is reified?

Aalishan Ansari

Senior Android App Developer | Startup | Product base | Java | Kotlin | MVVM | Architecture components | Android Blogger

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store