Interview Q&A · Java

Java Interview Questions & Answers

All 240 Core Java interview questions — basics, OOP, exceptions, threads, collections and serialization — rewritten with correct, up-to-date answers. This bank holds 294 questions across 56 topics and 12 topic groups. Every answer is written for current Java versions, and each topic links to matching course lessons where they exist.

294 questions answered56 topics12 topic groups
Pick a topic

Every topic below links to its own page with all of its questions in one place.

Read the answer

Answers are checked against current language behaviour; old-guide claims are corrected.

Jump both ways

Each topic points to the matching course lesson, and lessons point back here.

Core Java Basics

29 questions across 6 topics — Classes, objects, the JVM, bytecode and how Java represents text.

Methods & Constructors

18 questions across 4 topics — Constructors, this/super, overloading vs overriding and static members.

Coding Standards

7 questions across 1 topic — Naming conventions for classes, interfaces, methods, variables and constants.

OOP Mechanics

28 questions across 6 topics — IS-A/HAS-A, instanceof, packages, access modifiers, final and abstract types.

Exception Handling

34 questions across 6 topics — try/catch/finally, checked vs unchecked, throw/throws and custom exceptions.

Threads & Concurrency

54 questions across 7 topics — Thread lifecycle, synchronization, wait/notify, priorities and daemon threads.

Nested & Inner Classes

15 questions across 3 topics — Static nested, member, local and anonymous inner classes.

Objects, References & Memory

26 questions across 6 topics — References, garbage collection, wrappers, conversion, scope and classpath.

Interfaces, Enums & Features

18 questions across 4 topics — Modern interfaces, enums, field hiding, varargs and switch on strings.

OOP Concepts

13 questions across 3 topics — Procedural vs OOP, the four pillars, inheritance, polymorphism and covariant returns.

Collections Framework

41 questions across 9 topics — List, Set, Map, iterators, Hashtable vs HashMap and concurrent collections.

Serialization

11 questions across 1 topic — Serializable, serialVersionUID, transient fields and alternatives.

Recommended resourcesAffiliate links · may earn us a commission

Classic DSA interview booksThe reference books interviewers themselves learned from — great next to the visualizers.See the books Structured coding coursesVideo courses that pair well with visual practice — pick one language and go deep.Browse courses Cloud hosting for side projectsShip the portfolio project that gets you hired — free credits for new accounts.Claim credits