What programming languages are used for Android development?
Android development primarily uses Kotlin and Java. Google officially recommends Kotlin as the preferred language since 2019. Kotlin is concise, null-safe, and interoperable with Java code. Java remains widely used in legacy Android codebases. Both languages use the Android SDK and run on the Android Runtime (ART) on Android devices.
What is the Android Activity lifecycle?
Android Activity lifecycle states include: onCreate() (initialization), onStart() (becoming visible), onResume() (interactive, foreground), onPause() (partially obscured), onStop() (no longer visible), onDestroy() (activity destroyed). Understanding this lifecycle is essential for managing resources correctly โ saving data in onPause/onStop and releasing resources in onDestroy to prevent memory leaks.
What is Jetpack Compose and how does it differ from XML layouts?
Jetpack Compose is Android's modern declarative UI framework that replaces XML-based layout files. Instead of defining UI in XML and updating it imperatively, Compose lets you describe UI as Kotlin functions (Composables) that automatically recompose when state changes. Compose is more concise, easier to test, and better suited for complex dynamic UIs.