Interview Q&A / Java
Java interview questions
Collections, the JVM, strings, exceptions and threads, the backbone of most campus placement rounds.
Prefer rapid revision? Practise Java short interview answers →
- What is the difference between heap and stack memory in Java?
The stack holds method call frames with local primitives and references, and each thread has its own. The heap holds all objects and is shared by every thread and cleaned by the garbage collector.
BeginnerQuick answer1 min read