Java_Viva_Questions_Answers
Java_Viva_Questions_Answers
Basic Level
Q: What is Java?
A: JDK is for development, includes JRE and compiler. JRE is for running Java apps. JVM interprets bytecode into
machine code.
Intermediate Level
Q: What is inheritance?
A: Overloading: same method, different parameters. Overriding: same method, subclass modifies behavior.
Advanced Level
Q: What is an interface?
A: Abstract class: mix of methods. Interface: abstract methods only (Java 8+ allows default/static).
Q: What is multithreading?
A: final: constant, finally: always runs, finalize(): called by GC before object removal.