Fresher interview prep

Java Developer interview questions for freshers.

Fresher Java interviews test core Java, collections, exceptions and object-oriented design, often followed by a small coding task.

  1. 1. What is the difference between JDK, JRE and JVM?

    How to answer: The JVM runs bytecode, the JRE is the JVM plus libraries needed to run programs, and the JDK adds compilers and tools to build them.

  2. 2. Why is String immutable in Java?

    How to answer: Immutability enables the string pool, makes strings safe to share across threads and safe to use as HashMap keys.

  3. 3. What is the difference between == and equals()?

    How to answer: == compares references for objects; equals() compares content when the class overrides it, as String does.

  4. 4. How does a HashMap work internally?

    How to answer: Keys are hashed into buckets; collisions are stored in a list or, past a threshold, a tree. Mention hashCode() and equals().

  5. 5. What is the difference between checked and unchecked exceptions?

    How to answer: Checked exceptions must be declared or handled at compile time (IOException); unchecked ones extend RuntimeException.

  6. 6. Explain method overloading versus overriding.

    How to answer: Overloading: same name, different parameters, resolved at compile time. Overriding: subclass redefines a parent method, resolved at runtime.

  7. 7. What is the difference between ArrayList and LinkedList?

    How to answer: ArrayList gives fast index access; LinkedList gives cheaper inserts and removals in the middle but slow random access.

  8. 8. Describe a Java project you built.

    How to answer: Name the frameworks (for example Spring Boot), the part you wrote and one bug or design decision you can discuss in depth.

Get questions based on your own resume

Interviewers ask about your projects, not generic lists. Add your resume and RoundLeap builds 30 questions from it — 40 if you add a job description — and lets you practise a mock round.

No sign in or credit card required to see results.