All questions
of 49Explain 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.
The model's verdict: “”
The interactive diagram is below the answer - jump to diagram ↓
This answer is explained by a shared concept diagram - open →
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.
The model's verdict: “”
The interactive diagram is below the answer - jump to diagram ↓
This answer is explained by a shared concept diagram - open →
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.
The model's verdict: “”
The interactive diagram is below the answer - jump to diagram ↓
This answer is explained by a shared concept diagram - open →
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.
The model's verdict: “”
The interactive diagram is below the answer - jump to diagram ↓
This answer is explained by a shared concept diagram - open →
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.
The model's verdict: “”
The interactive diagram is below the answer - jump to diagram ↓
This answer is explained by a shared concept diagram - open →
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.
The model's verdict: “”
The interactive diagram is below the answer - jump to diagram ↓
This answer is explained by a shared concept diagram - open →
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.
The model's verdict: “”
The interactive diagram is below the answer - jump to diagram ↓
This answer is explained by a shared concept diagram - open →
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 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 Android build process.
What is the difference between Foreground, Background, and Bound services?
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.
Java (Android) cheatsheet
Android Development Interview Cheat Sheet
- Overview01
- 1. Android Fundamentals02
- 2. Activity Lifecycle03
- 3. Layouts and Views04
- 4. Fragments05
- 5. Intents and Navigation06
- 6. Data Storage07
- 7. Networking08
- 8. RecyclerView09
- 9. Services10
- 10. Broadcast Receivers11
- 11. Architecture Components12
- + 11 more inside
42 of 49 Java (Android) answers are gated.
Full answers, code samples, AI explanations - simpler, deeper, or as an interactive diagram. Cancel anytime.
- Full answers + code
- AI explain - simpler, deeper, or visualized
- 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.jsLAMP
Linux, Apache, MySQL, PHPRuby on Rails
Convention over ConfigurationJAM
JavaScript, APIs, and MarkupServerless 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, RabbitMQFastAPI
Python, FastAPI, SQLAlchemy, PostgreSQLReact Native
React, TypeScript, Redux, FirebaseiOS Native
Swift, SwiftUI, UIKit, FirebaseAndroid Native
Java, Jetpack Compose, FirebaseWeb3 / Ethereum
Solidity, Ethereum, Hardhat, FoundryDevOps / Platform
Docker, Kubernetes, Terraform, CI/CDCore 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.