Java Interview Questions & Answers (2025 Edition)
This document contains a list of commonly asked Java interview questions and their concise
answers. It is tailored for both freshers and experienced developers preparing for technical
interviews.
1. What are the main features of Java?
- Object-Oriented
- Platform Independent
- Robust
- Secure
- Multithreaded
2. What is the difference between JDK, JRE, and JVM?
- JDK: Java Development Kit
- JRE: Java Runtime Environment
- JVM: Java Virtual Machine
3. What is a constructor in Java?
- A constructor is a block of code used to initialize an object.
4. Explain the concept of Inheritance.
- Inheritance allows one class to acquire the properties of another class.
5. What are access modifiers?
- public, private, protected, and default - define the access level of classes, methods, and
variables.