🔴 Advanced · Lesson 25
Java Interview Questions
Java Interview Questions
Common Java Interview Questions
Frequently asked Java questions with short answers — useful for placements and viva.
Questions & Answers
| Question | Short Answer |
|---|---|
| Why is Java platform-independent? | Bytecode runs on any JVM. |
| JDK vs JRE vs JVM? | JDK develops, JRE runs, JVM executes bytecode. |
| == vs .equals()? | == compares references; .equals() compares content. |
| Overloading vs overriding? | Overloading = same name diff params; overriding = child redefines parent. |
| Why no multiple inheritance? | To avoid ambiguity; use interfaces instead. |
| What is a constructor? | Special method that runs on object creation. |
Summary
- Know platform independence, JDK/JRE/JVM, == vs equals, overloading vs overriding.
- Back each answer with a one-line example.
Common Java Interview Questions
अक्सर पूछे जाने वाले Java questions short answers के साथ — placements और viva के लिए उपयोगी।
Questions और Answers
| Question | Short Answer |
|---|---|
| Java platform-independent क्यों? | Bytecode किसी भी JVM पर चलता है। |
| JDK बनाम JRE बनाम JVM? | JDK develop, JRE run, JVM bytecode execute करता है। |
| == बनाम .equals()? | == references; .equals() content compare करता है। |
| Overloading बनाम overriding? | Overloading = एक नाम अलग params; overriding = child redefine। |
| Multiple inheritance क्यों नहीं? | Ambiguity से बचने को; interfaces use करें। |
| Constructor क्या है? | Object बनने पर चलने वाला special method। |
सारांश
- Platform independence, JDK/JRE/JVM, == बनाम equals, overloading बनाम overriding जानें।
- हर answer को one-line example से support करें।