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 a static nested class and an inner class in Java?
An inner (non-static) class holds a hidden reference to an instance of its outer class and can use its members. A static nested class has no such link, so it can be created without an outer object, like an ordinary top-level class placed inside another for organisation.
IntermediateQuick answer1 min read