Skip to main content
1:1 mock interviews with Sumit, scored on a real hiring rubric.Book a slot →

6 topics · 0/6 read

Core Java & OOP

JDK, JRE and JVM, the four OOP pillars, String immutability and the string pool, equals and hashCode, exceptions, and static, final, abstract classes and interfaces.

  1. JDK vs JRE vs JVM and How Java Runs

    JDK, JRE and JVM is the opening question of most Java interviews. The JDK is the toolkit to build Java programs, the JRE was the runtime to run them, and the JVM is the virtual machine that loads bytecode and runs it wit

    Read now
  2. OOP in Java: Encapsulation, Inheritance, Polymorphism, Abstraction

    The four OOP pillars in Java are encapsulation, inheritance, polymorphism and abstraction. Interviewers want each explained with code, plus overloading vs overriding and composition over inheritance.

    Read now
  3. String Immutability, the String Pool and StringBuilder

    Strings in Java are immutable and literals are stored in the string pool. Questions about == vs equals, why String is immutable and when to use StringBuilder appear in nearly every Java interview.

    Read now
  4. The equals and hashCode Contract

    If two objects are equal, they must have the same hashCode. Breaking the equals and hashCode contract makes HashMap and HashSet lose your objects, which is why interviewers always ask about it.

    Read now
  5. Exceptions: Checked vs Unchecked and Best Practices

    Java exceptions are split into checked exceptions the compiler forces you to handle and unchecked runtime exceptions. Interviewers ask about the hierarchy, try-with-resources, finally, and how exceptions should be handle

    Read now
  6. static, final, Abstract Classes and Interfaces

    Keywords like static and final, and the choice between abstract classes and interfaces, are classic Java interview questions. Modern interfaces with default, static and private methods have changed the answer.

    Read now