Java Interview Questions (Editable)
1. Core Java Basics
- What are the main features of Java?
- Explain JVM.
- Difference between JDK, JRE, JVM.
- Why Java is platform independent?
- What are access modifiers?
2. OOP in Java
- What are OOP pillars?
- Explain encapsulation.
- Explain inheritance.
- What is polymorphism?
- Method overloading vs overriding.
3. Data Types & Variables
- Types of data types in Java.
- Primitive vs non-primitive.
- Wrapper classes.
- Type casting.
- final keyword usage.
4. Operators & Control Flow
- Types of operators.
- Switch statement.
- == vs equals().
- For-each loop.
- try-catch-finally.
5. Collections
- What is Collections Framework?
- List vs Set.
- What is Map?
- ArrayList vs LinkedList.
- HashMap working.
6. Exception Handling
- Checked vs unchecked exceptions.
- Custom exceptions.
- throws keyword.
- try-with-resources.
- throw vs throws.
7. Multithreading
- What is thread?
- Runnable vs Callable.
- Synchronization.
- wait() vs notify().
- ExecutorService.
8. Java IO & NIO
- IO vs NIO.
- File reading/writing.
- Serialization.
- Character vs byte streams.
- Channels & buffers.
9. Java 8 Features
- Lambda expressions.
- Functional interfaces.
- Streams API.
- Optional class.
- Default & static methods.
10. Memory Management
- How Java manages memory?
- Garbage collection.
11. Annotations & Reflection
- What are annotations?
- Reflection usage.
- Built-in annotations.
- Custom annotations.
- Reflection use cases.
12. Frameworks
- Spring Framework.
- Dependency Injection.
- Hibernate & JPA.
- Transactions.
- Spring Boot vs Spring MVC.
13. Design Patterns
- What are design patterns?
- Singleton pattern.
- Factory pattern.
- Observer pattern.
- Adapter vs Decorator.
14. Testing & Debugging
- Unit testing.
- Exception testing.
- Mocking.
- TDD.
- Debugging techniques.