All questions
Showing of 109Explain the difference between == and .equals() in Java.
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
- == compares memory addresses (reference equality) for objects, and actual values for primitives.
- .equals() compares the actual content/values of objects.
String s1 = new String("Hello");
String s2 = new String("Hello");
String s3 = "Hello";
String s4 = "Hello";
System.out.println(s1 == s2); // false (different objects)
System.out.println(s1.equals(s2)); // true (same content)
System.out.println(s3 == s4); // true (string pool)
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
What are the different types of exceptions in Java?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
- Checked Exceptions: Must be handled at compile time (IOException, SQLException)
- Unchecked Exceptions: Runtime exceptions (NullPointerException, ArrayIndexOutOfBoundsException)
- Errors: Serious system problems (OutOfMemoryError, StackOverflowError)
// Checked exception - must handle
try {
FileReader file = new FileReader("file.txt");
} catch (IOException e) {
e.printStackTrace();
}
// Unchecked exception - optional handling
String str = null;
str.length(); // NullPointerException
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
Explain the four pillars of OOP with examples.
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
- Encapsulation: Bundling data and methods together, hiding internal details
- Inheritance: Creating new classes based on existing ones
- Polymorphism: Same interface, different implementations
- Abstraction: Hiding complex implementation details
// Encapsulation
public class BankAccount {
private double balance; // hidden data
public void deposit(double amount) { // controlled access
if (amount > 0) balance += amount;
}
}
// Inheritance
class Animal {
void speak() { System.out.println("Animal speaks"); }
}
class Dog extends Animal {
void speak() { System.out.println("Woof!"); }
}
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
What is the difference between method overloading and method overriding?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
- Overloading: Multiple methods with same name but different parameters (compile-time polymorphism)
- Overriding: Subclass provides specific implementation of parent class method (runtime polymorphism)
// Overloading
class Calculator {
int add(int a, int b) { return a + b; }
double add(double a, double b) { return a + b; }
}
// Overriding
class Shape {
void draw() { System.out.println("Drawing shape"); }
}
class Circle extends Shape {
@Override
void draw() { System.out.println("Drawing circle"); }
}
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
What is the Android Application Architecture?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
Android architecture consists of several layers:
- Applications: User-facing apps and system apps
- Application Framework: APIs for app development (Activity Manager, Content Providers, etc.)
- Libraries & Android Runtime: Core libraries and ART (Android Runtime)
- Hardware Abstraction Layer (HAL): Interface between Android and hardware
- Linux Kernel: Core system services, drivers, memory management
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
Explain the Android application lifecycle.
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
Android apps go through various states:
- Not running: App is terminated or never started
- Created: App is loaded into memory but not visible
- Started: App is visible but not in foreground
- Resumed: App is in foreground and interactive
- Paused: App is partially obscured
- Stopped: App is not visible
- Destroyed: App is terminated and removed from memory
The system manages this lifecycle based on memory pressure and user interactions.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
What is an APK and what does it contain?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
APK (Android Package Kit) is a compiled Android application package containing:
- Manifest file: App permissions, components, metadata
- Classes.dex: Compiled Java/Kotlin code
- Resources: Images, layouts, strings
- Assets: Raw files
- META-INF: Certificate and signature files
- lib/: Native libraries
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
Explain the four main Android components.
What is the difference between Activity and Fragment?
What is the difference between implicit and explicit intents?
What are the different types of layouts in Android?
Explain the concept of View and ViewGroup.
What is the difference between dp, sp, and px?
What are the different data storage options in Android?
Explain SharedPreferences and when to use it.
What is the main thread (UI thread) in Android?
What are the different types of testing in Android?
What is LiveData and how does it differ from Observable fields?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
LiveData is a lifecycle-aware observable data holder. Key differences from regular observables:
- Lifecycle awareness: Only notifies active observers
- Automatic cleanup: Removes observers when lifecycle is destroyed
- No memory leaks: Automatically handles observer lifecycle
- Main thread delivery: Updates always delivered on main thread
class UserViewModel : ViewModel() {
private val _userName = MutableLiveData<String>()
val userName: LiveData<String> = _userName
// Observer only receives updates when in STARTED or RESUMED state
}
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
What is Navigation Component and what problems does it solve?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
Navigation Component manages fragment transactions and provides:
- Visual navigation editor: Design navigation in Android Studio
- Type-safe argument passing: Using Safe Args plugin
- Built-in animations: Transition animations between destinations
- Deep linking: Handle incoming links
- Back stack management: Automatic handling of up/back actions
Components: NavGraph, NavController, NavDestination, and navigation XML.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
How do you pass data between fragments using Navigation Component?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
Using Safe Args plugin:
// In navigation XML
<fragment android:id="@+id/detailFragment">
<argument
android:name="userId"
app:argType="integer" />
</fragment>
// Passing data
val action = UserListFragmentDirections.actionToDetail(userId = 123)
findNavController().navigate(action)
// Receiving data
class DetailFragment : Fragment() {
private val args: DetailFragmentArgs by navArgs()
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
val userId = args.userId
}
}
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
What's the difference between Data Binding and View Binding?
What is Jetpack Compose and how does it differ from traditional View system?
What is a Composable function and what are its key characteristics?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
A Composable function is a regular Kotlin function annotated with @Composable that describes a piece of UI. When called, it emits UI elements into the composition.
Key Characteristics:
- Annotated with @Composable: Must have the annotation to be part of the composition
- Fast and idempotent: Should be fast to execute and produce the same result for the same inputs
- Side-effect free: Should not have side effects in the main body
- Can call other Composables: Can compose other UI elements
- Reactive to state changes: Automatically recomposes when state changes
@Composable
fun UserProfile(user: User) {
Column {
Text(text = user.name)
Text(text = user.email)
}
}
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
Explain the State and MutableState interfaces in Compose.
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
State and MutableState are interfaces that represent observable state in Compose:
State
- Read-only interface
- Has a
valueproperty - Triggers recomposition when observed
MutableState: - Extends State
- Allows modification of the value
- Created using
mutableStateOf()
Property Delegation:
Compose supports property delegation for cleaner syntax usingbykeyword.
@Composable
fun StateExample() {
// Using property delegation
var count by remember { mutableStateOf(0) }
// Without delegation
val countState = remember { mutableStateOf(0) }
Text("Count: $count") // Using delegated property
Text("Count: ${countState.value}") // Using state.value
Button(onClick = { count++ }) { Text("Increment") }
}
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
What are Modifiers in Compose and how do they work?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
Modifiers are a way to decorate or configure Composable elements. They allow you to change appearance, add behavior, handle events, and modify layout.
Key Characteristics:
- Chainable: Multiple modifiers can be chained together
- Order matters: The sequence of modifiers affects the result
- Immutable: Each modifier returns a new Modifier instance
Common Modifier Categories: - Layout:
size,padding,fillMaxWidth - Appearance:
background,border,clip - Interaction:
clickable,focusable - Drawing:
alpha,rotate,scale
@Composable
fun ModifierExample() {
Box(
modifier = Modifier
.size(100.dp)
.background(Color.Blue)
.padding(16.dp)
.clickable { /* handle click */ }
.clip(CircleShape)
)
}
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
Explain the difference between Row, Column, and Box layouts.
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
These are the fundamental layout composables in Compose:
Row:
- Arranges children horizontally
- Supports horizontal arrangement and vertical alignment
- Similar to LinearLayout with horizontal orientation
Column: - Arranges children vertically
- Supports vertical arrangement and horizontal alignment
- Similar to LinearLayout with vertical orientation
Box: - Stacks children on top of each other
- Supports content alignment
- Similar to FrameLayout
@Composable
fun LayoutExamples() {
Row(
horizontalArrangement = Arrangement.SpaceBetween,
verticalAlignment = Alignment.CenterVertically
) {
Text("Left")
Text("Right")
}
Column(
verticalArrangement = Arrangement.Center,
horizontalAlignment = Alignment.CenterHorizontally
) {
Text("Top")
Text("Bottom")
}
Box(contentAlignment = Alignment.Center) {
Text("Background")
Text("Foreground")
}
}
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
How do you create custom Composable functions?
What is the difference between String, StringBuilder, and StringBuffer?
Explain Java's garbage collection mechanism.
Explain the concept of interfaces vs abstract classes.
What is the difference between Dalvik and ART?
Explain Activity lifecycle methods in detail.
What are the different types of Services in Android?
Explain RecyclerView and its advantages over ListView.
What is Room Database and its components?
Explain the difference between Serializable and Parcelable.
Explain different ways to perform background operations in Android.
What is a Handler and Looper in Android?
What are the lifecycle-aware components for background operations?
How do you perform network operations in Android?
How do you handle network security in Android?
What causes memory leaks in Android and how to prevent them?
Explain OutOfMemoryError and how to handle it.
Explain MVC, MVP, and MVVM patterns in Android.
What is Dependency Injection and why is it useful?
Explain the Repository pattern in Android.
How do you test Activities and Fragments?
How do you optimize Android app performance?
What is ANR and how do you prevent it?
What are Android security best practices?
How do you store sensitive data securely in Android?
What is the difference between Kotlin and Java for Android development?
Explain Android App Bundle and its benefits.
What is WorkManager and when should you use it?
Explain the concept of Deep Links in Android.
What are Content Providers and when to use them?
How do you handle different screen sizes and orientations?
Explain the MVVM pattern in context of Android Architecture Components.
Explain ViewModel and its lifecycle. Why doesn't it get destroyed on configuration changes?
What are the different types of LiveData and when to use each?
How do you handle database migrations in Room?
Explain different types of relationships in Room.
What are the threading rules in Room and how do you handle them?
Explain different navigation patterns and when to use each.
How do you handle deep links in Navigation Component?
Explain different types of WorkRequests in WorkManager.
How do you chain work operations in WorkManager?
What is Paging Library and what are its benefits?
How do you implement basic paging with Paging 3?
How do you handle loading states in Paging 3?
How do you implement custom binding adapters in Data Binding?
Explain state management in Compose with remember and mutableStateOf.
What is DataStore and how does it improve upon SharedPreferences?
What is Hilt and how does it simplify dependency injection?
Explain CameraX and its advantages over Camera2 API.
What is the difference between Flow and LiveData?
How do you implement Repository pattern with Room and Retrofit?
Explain the concept of recomposition in Jetpack Compose.
What is the difference between `remember` and `rememberSaveable`?
What is state hoisting and why is it important?
What are the different types of state in Compose and when to use each?
What is LazyColumn and how does it differ from Column with scrolling?
What is `derivedStateOf` and when should you use it?
How does Compose Navigation work?
How do you handle configuration changes in Compose?
How do you test Composable functions?
What debugging tools are available for Compose?
How do you handle errors in Compose?
How do you integrate Compose with existing View-based code?
How do you implement animations in Compose?
How do you handle deep linking in Compose Navigation?
Explain the Android build process.
What is the difference between Foreground, Background, and Bound services?
How do you implement database testing in Room?
How do you monitor work status and handle failures in WorkManager?
How do you handle side effects in Compose?
How do you implement encrypted storage in Android with Security library?
How do you test ViewModels that use Hilt?
What are the best practices for using Android Jetpack libraries?
What are Jetpack Compose effects and when to use each?
What causes unnecessary recompositions and how can you avoid them?
How can you optimize LazyColumn/LazyRow performance?
What is the purpose of `@Stable` and `@Immutable` annotations?
What is CompositionLocal and when should you use it?
What are custom Modifiers and how do you create them?
What is the Composition lifecycle?
How do you implement custom layouts in Compose?
What are the performance implications of using Compose?
What are some common Compose pitfalls and how to avoid them?
This answer is part of Pro.
The full written answer, with the trade-offs and follow-ups an interviewer will probe.
No matches
Try a different filter or search term.
Android & Jetpack Compose cheatsheet
- Android Fundamentals01
- Activity Lifecycle02
- Layouts and Views03
- Fragments04
- Intents and Navigation05
- Data Storage06
- Networking07
- RecyclerView08
- Services09
- Broadcast Receivers10
- Architecture Components11
- Coroutines (Kotlin-Java Interop)12
- + 10 more inside
- + 16 more inside
95 of 109 Android & Jetpack Compose answers are in Pro.
Full answers, code samples, and AI explanations that go simpler or deeper. Cancel anytime.
- Full answers + code
- AI explanations, simpler or deeper
- 1,000 AI credits / month
- Cancel anytime
Change topic
Pick a different technology or stack. Your current topic stays put until you choose a new one.
MEAN
MongoDB, Express, Angular, Node.jsMERN
MongoDB, Express, React, Node.jsDjango
Python Full-Stack DevelopmentRuby on Rails
Convention over ConfigurationServerless on AWS
Serverless Architecture on AWSInterviewers also test these - they're common to every stack, whichever one you picked above.
Flutter Mobile
Flutter Cross-Platform Mobile DevelopmentInterviewers also test these - they're common to every stack, whichever one you picked above.
Spring Boot
Enterprise Java Development.NET
Microsoft EcosystemVue
Vue.js, Vite, TypeScript, Tailwind, Node.jsGo Backend
Golang, gRPC, PostgreSQL, Redis, RabbitMQInterviewers also test these - they're common to every stack, whichever one you picked above.
FastAPI
Python, FastAPI, SQLAlchemy, PostgreSQLReact Native
React, TypeScript, Redux, FirebaseiOS Native
Swift, SwiftUI, UIKit, FirebaseAndroid Native
Java, Jetpack Compose, FirebaseDevOps / Platform
Docker, Kubernetes, Terraform, CI/CDInterviewers also test these - they're common to every stack, whichever one you picked above.
AI Engineer
LLMs, RAG, Agents, EvalsAI-Powered Developer
Claude Code, Copilot, Agentic WorkflowsCore SWE Interview Prep
Data structures, algorithms, OS, concurrency, networking, gitInterviewers also test these - they're common to every stack, whichever one you picked above.
Interviewers also test these - they're common to every stack, whichever one you picked above.