Skip to content
InterviewEra
What is InterviewEraThe platform, founder, and missionHow It WorksAdaptive interview, live captions, scoringResume-aware ScoringCV-native questions + 5-dimension feedback
Campus Placements OverviewStructured mock interviews and cohort analytics for T&P teamsSet up Campus WorkspaceCreate your campus dashboard and invite your batchT&P Product & PricingPilot pricing, bulk onboarding, and placement trackingStudent Invitation HelpHow to accept a campus invite and start practising
Software EngineerDSA, system design, OOP roundsFrontend DeveloperReact, HTML/CSS, JavaScript interviewsTCS Interview QuestionsNQT + technical + HR roundsWipro Careers HubNLTH, WILP, Turbo hiring tracksSolera Careers HubCognitive assessment + Java/SQL roundsReact Interview QuestionsHooks, state, performance topics
Interview Question GeneratorRole-specific questions in secondsATS Resume CheckerScore your resume against job rolesSTAR Answer BuilderStructure behavioral answers clearly
All ResourcesCentral guide and hub directoryBlogInterview prep articles and guidesAgentic AI Interview GuideAI-assisted coding interviews, rubrics, and prepPlacement GuideStep-by-step campus prep playbookSTAR Method GuideMaster behavioral answers
Help CenterGuides, FAQs, and supportDSA Topic MapPatterns, roadmap, and top 50 problemsSoftware Engineer GuideSWE questions and prep hubAndroid GuideKotlin, Compose, MVVM prep hubFrontend GuideReact and JavaScript interviews
PricingFor Teams
Sign inSign up
InterviewEra

InterviewEra is an AI-powered mock interview platform with adaptive follow-ups, resume-aware scoring, and structured interview preparation for campus placements and early-career hiring.

Start Mock Interview

Mock Interview

  • How It Works
  • For Teams
  • Start Mock Interview
  • Campus Placements
  • Campus Workspace
  • Help Center

Free Tools

  • Interview Question Generator
  • ATS Resume Checker
  • STAR Answer Builder

Interview Questions

  • Wipro Careers Hub
  • Solera Careers Hub
  • Amazon SDE Questions
  • Microsoft SDE Questions
  • Infosys SWE Questions
  • Infosys Java Questions
  • Freshworks Frontend Questions
  • Android Developer Questions
  • Frontend Developer Questions
  • Java Developer Questions

Resources

  • Community Hub
  • All Resources
  • Blog
  • Agentic AI Interview Guide
  • What Is Agentic AI
  • Agentic Coding Round
  • AI Prompt Engineering
  • Cursor AI Interview Guide
  • DSA Topic Map
  • Placement Guide
  • STAR Guide
  • HR Guide
  • Interview Tips

Company

  • What is InterviewEra
  • About Us
  • Pricing
  • Contact

© 2026 InterviewEra. All rights reserved.

Privacy PolicyTermsRefundRanchi, Jharkhand, India
Interview Questions›Topics›Java

Backend · Fresher-relevant

Java Interview Questions 2026

Core Java interview questions on OOPs, collections, multithreading, JVM internals, and exception handling — the primary language tested by TCS, Infosys, and Wipro.

BackendFresher-relevant

Java Interview Questions

Placement-oriented · Updated 2026
  1. 01

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

    TechnicalEasy

    Tip: == compares references (whether two variables point to the same object), while .equals() compares logical value. For String literals interned in the string pool == may appear to work, but always use .equals() for content comparison. Override equals() and hashCode() together for custom classes.

  2. 02

    Explain the Java memory model: stack vs heap.

    TechnicalMedium

    Tip: The stack stores method frames, local primitives, and object references — it is per-thread and freed when a method returns. The heap stores all objects and is shared across threads and managed by the garbage collector. Class metadata lives in the Metaspace (post-Java 8, replacing PermGen).

  3. 03

    What is the difference between HashMap, HashTable, and ConcurrentHashMap?

    TechnicalMedium

    Tip: HashMap is unsynchronised and allows one null key. HashTable is fully synchronised (legacy, slow) and disallows nulls. ConcurrentHashMap uses bucket/segment-level locking (CAS + synchronized bins since Java 8) for high-concurrency reads/writes without locking the whole map — prefer it over HashTable.

  4. 04

    What are the four pillars of OOP and how does Java implement each?

    TechnicalEasy

    Tip: Encapsulation (private fields + getters/setters), Inheritance (extends, single class inheritance), Polymorphism (method overriding + dynamic dispatch, overloading at compile time), and Abstraction (abstract classes and interfaces). Mention that Java supports multiple interface inheritance but single class inheritance.

  5. 05

    What is the difference between an abstract class and an interface?

    TechnicalMedium

    Tip: An abstract class can hold state (fields), constructors, and a mix of concrete and abstract methods; a class extends only one. An interface defines a contract — since Java 8 it can have default and static methods, and a class can implement many. Use an interface for "can-do" capabilities, an abstract class for shared base state.

  6. 06

    How does garbage collection work in Java? What is a memory leak in a GC language?

    TechnicalHard

    Tip: GC reclaims unreachable objects using generational collection (Young/Eden + Survivor, then Old gen). Algorithms include G1 (default since Java 9) and ZGC for low pause times. A leak still occurs when objects remain reachable but are no longer needed — e.g. static collections, unremoved listeners, or unclosed resources holding references.

  7. 07

    What is the difference between checked and unchecked exceptions?

    TechnicalEasy

    Tip: Checked exceptions (extend Exception) must be declared or handled at compile time — e.g. IOException. Unchecked exceptions (extend RuntimeException) signal programming errors like NullPointerException and need not be declared. Do not swallow exceptions; either handle meaningfully or propagate.

  8. 08

    Explain the volatile keyword and the difference between volatile and synchronized.

    TechnicalHard

    Tip: volatile guarantees visibility — reads/writes go to main memory, preventing stale cached values — but not atomicity. synchronized provides both mutual exclusion (atomicity) and visibility via the happens-before relationship. Use volatile for simple flags; use synchronized or AtomicInteger for compound read-modify-write operations.

Practice Java questions with your own resume

InterviewEra generates role-specific questions using your actual projects and skills. Get scored feedback on technical depth, clarity, and structure — free to start.

Start free mock interviewFree question generator

Roles that need Java

  • Software Engineer questions
  • Java Developer questions
  • Backend Developer questions
  • Android Developer questions

Related backend topics

  • Python questions
  • Node.js questions
  • REST APIs questions
  • Spring Boot questions
  • Django questions

Practice tools

  • Interview question generator
  • ATS resume checker
  • STAR answer builder

Guides and resources

  • All interview questions
  • HR interview answer tips
  • STAR method with examples