Java is the dominant backend language at Indian enterprises: TCS, Infosys, Wipro, HCL, and Cognizant collectively employ hundreds of thousands of Java developers. At product companies, Java Spring Boot powers the backends of Flipkart, Razorpay, Paytm, HDFC Bank's digital platform, PhonePe, and MakeMyTrip. The Java developer interview varies significantly between service IT and product companies in India: this guide covers both, with the technical topics, question banks, and preparation strategy for each.
Core Java Topics: The Foundation for All Java Interviews
These topics appear in virtually every Java developer interview in India, from TCS campus drives to Google India lateral hires. Object-Oriented Programming: the 4 pillars (Encapsulation, Inheritance, Polymorphism, Abstraction) with code examples. The difference between method overloading and method overriding. Abstract class vs interface (and when to use each: an important design question). Why Java does not support multiple inheritance with classes but supports it with interfaces. Collections Framework: the hierarchy (Iterable, Collection, List, Set, Queue, Map). ArrayList vs LinkedList: time complexity of add, remove, get for each. HashMap internals: how hashing works, the role of hashCode() and equals(), what happens when two keys have the same hash (chaining). LinkedHashMap vs TreeMap: ordering guarantees. ConcurrentHashMap vs Hashtable: thread safety mechanisms. Multithreading: Thread vs Runnable. The synchronized keyword: method-level and block-level. volatile keyword: visibility guarantee vs atomicity. Deadlock: what causes it and how to avoid it. The java.util.concurrent package: ExecutorService, Future, CountDownLatch, CyclicBarrier, Semaphore. Java Memory Model: heap vs stack, what gets stored where. Garbage collection basics: generational GC (young, old, permanent/metaspace). Java 8 Features: lambda expressions (syntax and when to use). Stream API (map, filter, reduce, collect). Optional (why it exists and how to use it correctly). CompletableFuture for async operations. New date/time API (LocalDate, LocalDateTime, ZonedDateTime).
Spring Boot Interview Questions for Indian Companies
Spring Boot is the de-facto framework for Java microservices in India. Spring Boot Auto-configuration: how @SpringBootApplication triggers component scanning, auto-configuration, and context creation. The role of spring.factories (now spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports). Dependency Injection: constructor vs field vs setter injection and why constructor injection is preferred (immutability, testability, mandatory dependencies). @Autowired vs @Bean vs @Component. Scope of Spring beans: Singleton (default: one instance per application context), Prototype (new instance per injection), Request and Session (web contexts). @Transactional: what it does under the hood (proxy-based AOP), propagation levels (REQUIRED, REQUIRESNEW, SUPPORTS: when each is appropriate), isolation levels (READCOMMITTED, REPEATABLE_READ). Transaction management failure modes: @Transactional on a private method (does not work), calling a @Transactional method from within the same bean (does not work due to proxy bypass). REST API design: @RestController vs @Controller. @RequestBody vs @RequestParam. @PathVariable. ResponseEntity for controlling status codes. Error handling: @ControllerAdvice and @ExceptionHandler for global exception handling. Spring Security basics: authentication vs authorisation, JWT integration, method-level security with @PreAuthorize. Spring Data JPA: repository pattern, the difference between CrudRepository, JpaRepository, and PagingAndSortingRepository. N+1 query problem and how to fix it with @EntityGraph or JOIN FETCH in JPQL.
Design Patterns and System Design for Senior Java Roles
Mid-level and senior Java developer interviews at Indian product companies add design pattern and system design questions. Design patterns most commonly asked: Singleton (thread-safe implementation with double-checked locking and volatile). Builder (for constructing complex objects: why it is better than telescoping constructors). Factory and Abstract Factory. Strategy (replacing if-else chains with polymorphism). Observer (event-driven programming, the basis of Spring's event system). Decorator (adding behaviour without inheritance: Java's I/O streams are the canonical example). System design with Java context: 'Design a thread-safe LRU cache in Java' (tests LinkedHashMap, synchronisation, ConcurrentHashMap with access-order). 'Design a rate limiter using Java' (token bucket or sliding window algorithm with AtomicInteger or Semaphore). 'Design an asynchronous notification service using Spring' (Spring Events, @Async, message queues). Java-specific performance questions at senior levels: when to use parallel streams vs sequential streams (overhead of thread pool management means parallel is not always faster for small datasets). GC tuning flags (-Xmx, -Xms, -XX:+UseG1GC, GC log analysis). JVM profiling with async-profiler or JFR (Java Flight Recorder). Diagnosing thread dumps for deadlocks.
Practise Java and Spring Boot interview questions with HireStepX's AI voice interviewer. Get evaluated on your answers to common Java depth questions with immediate coaching feedback.
Practice freeJava Developer Salary in India 2026 and Career Path
Java developer compensation in India varies dramatically between service IT and product companies. Service IT (TCS, Infosys, Wipro, HCL, Cognizant, Tech Mahindra): Fresher/Junior (0-2 years): Rs 3.5-7 LPA. Mid-level (2-5 years): Rs 7-18 LPA. Senior (5-8 years): Rs 15-30 LPA. Tech Lead/Architect (8+ years): Rs 25-55 LPA. Product companies (Flipkart, Razorpay, PhonePe, Paytm, HDFC Bank Tech, MakeMyTrip, Swiggy): Junior SWE (0-2 years): Rs 15-30 LPA. Mid-level SWE (2-5 years): Rs 28-55 LPA. Senior SWE (5+ years): Rs 50-100 LPA. Staff/Principal SWE (8+ years): Rs 90-180 LPA. The service-to-product transition: the most common career move for Java developers in India. Skills needed to move: strong DSA (LeetCode medium-to-hard), depth in Spring Boot microservices, SQL and database design, basic distributed systems concepts (CAP theorem, eventual consistency, message queues). Typically 2-3 months of focused preparation. The salary jump on transition is often 2-3x for mid-level developers: from Rs 12 LPA at an IT service company to Rs 25-35 LPA at a mid-tier product company.
Frequently asked questions
Explore more