Last updated: June 26, 2026
10 of 10 questions
The JVM runs bytecode, the JRE bundles the JVM plus core libraries to run apps, and the JDK adds compilers and tools to develop them.
Primitives (int, double) store raw values on the stack; wrappers (Integer, Double) are objects enabling use in collections and nullability, with autoboxing between them.
Hash-based collections rely on the contract that equal objects have equal hash codes; overriding one without the other breaks HashMap and HashSet behaviour.
An interface defines a contract a class can implement (multiple allowed); an abstract class provides partial implementation and state via single inheritance.
List for ordered sequences (ArrayList/LinkedList), Set for uniqueness (HashSet/TreeSet), and Map for key-value lookups (HashMap/TreeMap).
Checked exceptions must be declared or caught at compile time (recoverable conditions); unchecked (RuntimeException) signal programming bugs and need no declaration.
Immutability makes Strings safe to share and cache; the String pool interns literals so identical strings reuse one instance, saving memory.
The JVM automatically reclaims unreachable objects using generational, mostly mark-and-sweep collectors (G1, ZGC) that minimise pause times.
synchronized and volatile for low-level control, plus java.util.concurrent — ExecutorService, concurrent collections, locks, and atomics — for higher-level safety.
Streams express functional pipelines (map, filter, reduce) over data; they are lazy, single-use, and don’t store elements, unlike collections.
Upload your resume and get an instant ATS score with keyword gaps — free, no sign-up.
Python Interview Questions
10 questions
Node.js Interview Questions
Advanced Node.js Interview Questions