Skip to content

Java Developer interview questions

Core Java, collections, concurrency, JVM, Spring and testing for Java developer roles.

61 questions · 6 topics · 12 free answers

Java Developer roadmap4 stages from basics to interview-ready. Learn the gaps, then come back and practise.

0 of 61 practised · 0 bookmarked · saved on this device

61 questions

  1. #1What are the four pillars of object-oriented programming?EasyConceptCore Java and OOP Pro answer

    This answer is part of Pro

    10 of 61 Java Developer answers are free. A Pro pass opens the rest, including hands-on task steps.

  2. #2What does the final keyword do on a variable, method and class?EasyConceptCore Java and OOP Pro answer

    This answer is part of Pro

    10 of 61 Java Developer answers are free. A Pro pass opens the rest, including hands-on task steps.

  3. #3What is autoboxing and what risk does it carry?EasyConceptCore Java and OOP Pro answer

    This answer is part of Pro

    10 of 61 Java Developer answers are free. A Pro pass opens the rest, including hands-on task steps.

  4. #4What is the contract between equals() and hashCode()?MediumConceptCore Java and OOP Pro answer

    This answer is part of Pro

    10 of 61 Java Developer answers are free. A Pro pass opens the rest, including hands-on task steps.

  5. #5How do records, sealed classes and enums differ from ordinary classes?MediumConceptCore Java and OOP Pro answer

    This answer is part of Pro

    10 of 61 Java Developer answers are free. A Pro pass opens the rest, including hands-on task steps.

  6. #6What is the difference between composition and inheritance, and which do you prefer?MediumConceptCore Java and OOP Pro answer

    This answer is part of Pro

    10 of 61 Java Developer answers are free. A Pro pass opens the rest, including hands-on task steps.

  7. #7What is the try-with-resources statement?MediumConceptCore Java and OOP Pro answer

    This answer is part of Pro

    10 of 61 Java Developer answers are free. A Pro pass opens the rest, including hands-on task steps.

  8. #8What are generics and what is type erasure?MediumConceptCore Java and OOP Pro answer

    This answer is part of Pro

    10 of 61 Java Developer answers are free. A Pro pass opens the rest, including hands-on task steps.

  9. #9Explain PECS for wildcard generics.HardConceptCore Java and OOP Pro answer

    This answer is part of Pro

    10 of 61 Java Developer answers are free. A Pro pass opens the rest, including hands-on task steps.

  10. #10A teammate overrides equals but not hashCode on an entity used as a HashMap key and lookups intermittently fail. How do you explain and fix it?HardScenarioCore Java and OOP Pro answer

    This answer is part of Pro

    10 of 61 Java Developer answers are free. A Pro pass opens the rest, including hands-on task steps.

Hunting for a Java Developer role too? See open Java Developer jobs.