Skip to content
Veltoryx Technologies
ProLesson 14.1Intermediate3 min readUpdated 30 October 2026

Top core Java interview questions

The core Java questions asked most often, with short, confident answers and links back to the full lessons.

This module is your revision kit. Each answer is short enough to say out loud in an interview. If one feels shaky, revisit the linked lesson. Practise saying the answers aloud, in your own words.

01Platform and basics

1. What's the difference between JDK, JRE and JVM? The JVM runs bytecode; the JRE is the JVM plus the standard libraries; the JDK is the JRE plus development tools such as javac. (Lesson 1.2)

2. Why is Java platform independent? javac compiles to bytecode, and every operating system has its own JVM that runs the same bytecode. (1.2)

3. Is Java pass-by-value or pass-by-reference? Always pass-by-value. For objects, the value copied is the reference, so a method can change the object but can't make the caller's variable point to a different object. (2.6)

4. What are the primitive types? Why isn't Java 100% object-oriented? byte, short, int, long, float, double, boolean and char. They aren't objects, which is why Java isn't purely object-oriented; wrapper classes like Integer fill the gap. (2.1)

5. What is autoboxing, and what's the Integer cache trap? Automatic conversion between primitives and wrappers. Integer caches -128 to 127, so == happens to work for small values and fails for larger ones. Compare with equals. (6.1)

6. What does static mean? The member belongs to the class, not to an instance: one shared copy, with no this. main is static so the JVM can call it without creating an object. (4.4)

7. What are the uses of final? A final variable can't be reassigned; a final method can't be overridden; a final class can't be extended. A final reference can still point to a mutable object. (4.8)

Loading the rest of the lesson…