InterviewEra.com

AI-powered mock interviews and resume-aware scoring — built for Indian campus and early-career hiring. Now in private beta.

Start Mock Interview
Secure payments via Razorpay

Tools

  • Question Generator
  • ATS Resume Checker
  • STAR Builder

Interview Questions

  • Software Engineer Questions
  • TCS Interview Questions
  • React Interview Questions

Resources

  • Blog
  • Placement Guide
  • STAR Method Guide

Company

  • About
  • Pricing
  • Contact

© 2026 InterviewEra.com. All rights reserved.

Privacy PolicyTermsRefundRanchi, Jharkhand, India
Interview Questions›TCS›Java Dev

TCS · engineering

TCS Java Developer Interview Questions 2026

Preparation guide for Java Developer positions at Tata Consultancy Services. Covers their Online Test (NQT) → Technical → HR process with technical, behavioral, and HR questions.

Interview rounds
3
Avg. package
3.5–7 LPA
Role type
engineering

TCS Java Developer Interview Questions

Placement-oriented · Updated 2026
  1. 01

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

    TechnicalEasy

    Tip: `==` compares object references (memory addresses). `.equals()` compares logical content — overridden in String and most value classes. Classic trap: `new String("a") == new String("a")` is false; `.equals()` is true.

  2. 02

    What are the key features introduced in Java 8?

    TechnicalEasy

    Tip: Lambda expressions, Stream API, Optional class, functional interfaces, default/static interface methods, new Date-Time API (java.time), and CompletableFuture. Streams and lambdas are the most commonly tested.

  3. 03

    What is the difference between ArrayList and LinkedList in Java?

    TechnicalEasy

    Tip: ArrayList: O(1) random access, O(n) insert/delete at middle. LinkedList: O(n) access, O(1) insert/delete at head/tail. Use ArrayList by default; LinkedList only when you frequently add/remove at ends and never random-access.

  4. 04

    What are checked and unchecked exceptions in Java? When do you use each?

    TechnicalMedium

    Tip: Checked exceptions (extend Exception) must be declared or caught — for recoverable conditions like file not found. Unchecked (extend RuntimeException) are for programming errors (NPE, ArrayIndexOutOfBounds). Do not catch RuntimeException broadly.

  5. 05

    What are the SOLID principles? Give a one-line Java example for each.

    TechnicalMedium

    Tip: S: Single Responsibility — one class, one reason to change. O: Open/Closed — extend via inheritance, not modification. L: Liskov Substitution — subclasses must be substitutable. I: Interface Segregation — small focused interfaces. D: Dependency Inversion — depend on abstractions.

  6. 06

    What is multithreading in Java? Explain `synchronized`, `volatile`, and when you use each.

    TechnicalHard

    Tip: `synchronized` acquires a monitor lock — prevents concurrent access to a block. `volatile` ensures a variable is read from main memory, not a thread-local cache — no atomicity guarantee. Use `volatile` for single-write flags; `synchronized` for compound operations.

  7. 07

    Explain Spring Boot auto-configuration. How does it work under the hood?

    TechnicalHard

    Tip: @SpringBootApplication triggers @EnableAutoConfiguration. Spring Boot scans META-INF/spring.factories, finds @Configuration classes, and applies them conditionally using @ConditionalOnClass/@ConditionalOnMissingBean. The app gets sensible defaults without XML.

  8. 08

    Tell me about a Spring Boot application you built. What design decisions are you most proud of?

    BehavioralMedium

    Tip: Name a specific technical choice: service layer separation, DTO pattern, exception handler with @ControllerAdvice, custom validation. Tie it to the problem it solved, not just "it follows best practices."

  9. 09

    A Java service is throwing OutOfMemoryError in production at peak traffic. What is your approach?

    SituationalHard

    Tip: Immediate: increase heap (-Xmx), take heap dump (jmap), restart if needed. Analysis: load heap dump in Eclipse MAT or VisualVM, find largest retained set. Common causes: unbounded caches, session leaks, large result sets loaded into memory. Fix root cause.

  10. 10

    What is garbage collection in Java? Explain generational GC.

    TechnicalMedium

    Tip: GC automatically reclaims unused heap memory. Generational GC: most objects die young (Eden). Young Gen: minor GC, fast. Old Gen: major GC, slower. G1GC (Java 9+ default) divides heap into regions for predictable pause times.

  11. 11

    What is the difference between HashMap and HashTable in Java?

    TechnicalEasy

    Tip: HashMap is non-synchronised (faster, not thread-safe), allows one null key. HashTable is synchronised (thread-safe but slow), no null keys. Prefer ConcurrentHashMap over HashTable in multithreaded code.

  12. 12

    Java vs Python — for a high-throughput, low-latency backend service, which would you choose and why?

    HREasy

    Tip: Java: JVM JIT compilation, mature concurrency primitives, type safety. Python: GIL limits true parallelism, but async frameworks (FastAPI) excel for I/O-bound workloads. Show you understand the trade-off — neither is universally better.

Practice answering, not just reading

Take a full scored mock interview tailored to your resume. Get feedback on technical depth, clarity, structure, confidence, and relevance — free to start.

Start free mock interviewFree question generator

Explore more

  • All Java Developer questions
  • All TCS questions

Related guides and tools

  • STAR method with examples
  • HR interview answer tips
  • Placement interview prep guide
  • Top fresher interview questions
  • All articles