Need a new HRIS? Our new buyer’s guide is packed with all the things you need to know. Get your free guide now

Java Developer interview questions and answers

This Java Developer interview profile brings together a snapshot of what to look for in candidates, with a balanced sample of suitable interview questions.

java-developer



Java Developer Interview Questions

In some respects even the most technical role demands qualities common to strong candidates for all positions: the willingness to learn; qualified skills; passion for the job.

Even college performance, while it helps you to assess formal education, doesn’t give a complete picture. This is not to underplay the importance of a solid background in computer science. Some things to look for:

• Understanding of basic algorithmic concepts
• Discuss basic algorithms, how would they find/think/sort
• Can they show a wider understanding of databases?
• Do they have an approach to modelling?

Do they stay up to date with the latest developments? If so, how? Probe for their favourite technical books. Who are they following on Twitter, which blogs do they turn to?

Are they active on Github? Do they contribute to any open source software projects? Or take part in Hackathons. In short, how strong is their intellectual interest in their chosen field? How is this demonstrated? Ask for side projects (like game development). Committed, inquisitive candidates will stand out.

Computer Science questions

  • How do you know if a linked list has a cycle in it? As in, one of the nodes in the linked list points to a previous node in the list.
  • Describe the characteristics of an ACID database system.

Role-specific questions

    • Is Java a statically or dynamically typed language?
    • What do we mean by polymorphism, inheritance and encapsulation?
    • Do arguments in Java get passed by reference or by value?
    • What is the difference between an abstract class and an interface and when would you use one over the other?
    • Why use an object Factory and how would you implement the Singleton pattern?
    • What is the difference between “==” and equals(…) method? What is the difference between shallow comparison and deep comparison of objects?
    • How is Java EE related to Java SE?
    • How are Runtime exceptions different from Checked exceptions?
    • What is the difference between HashMap, ConcurrentHashMap and a Map returned by Collections.synchronizedMap?
    • Servlets 3.0 introduced async support. Describe a use case for it.
    • Why do you think lambda expressions are considered such a big thing in Java 8?
    • Given this code fragment:
      class Engine { }
      public class App {
        public static void main(String[] args) {
          Engine e = new Engine();
          Engine e1 = e;
          e = null;
        }
      }
      

      Which statement is true about this code?

      1. It creates an object and the object is eligible for garbage collection.
      2. It creates an object and the object is not eligible for garbage collection.
      3. It creates two objects: e and e1. The e object is eligible for garbage collection.
      4. It creates two objects and both the objects are ineligible for garbage collection.
    • Is this possible in Java?
      A extends B, C

       

Source and recruit Java Developers with Workable’s Boolean search cheat sheets.

Ready to fine-tune this interview kit?
Regenerate with AI

Jump to section

    Let's grow together

    Explore our full platform with a 15-day free trial.
    Post jobs, get candidates and onboard employees all in one place.

    Start a free trial