Java remains the dominant backend language at Indian IT services companies (TCS, Infosys, Wipro, Cognizant) and is widely used at product companies (Flipkart, Swiggy, Zepto, Razorpay) and FAANG India. The interview covers Core Java fundamentals, Java 8+ features (streams, lambda, Optional), Spring Boot and Spring MVC, microservices architecture, and coding questions. The depth expected scales with the company type: IT services companies test Core Java; product companies add Java concurrency and system design; FAANG India adds JVM internals and LeetCode medium to hard.
Core Java Concepts Tested in Indian Interviews
Collections framework: ArrayList vs LinkedList (ArrayList: O(1) random access via index, backed by array; LinkedList: O(1) head/tail insert/delete, O(n) random access, higher memory overhead from node pointers). HashMap internals: hash(key) determines bucket; Java 8+ converts chained nodes to a red-black tree when chain length exceeds 8 (reduces worst-case from O(n) to O(log n) lookup). Load factor 0.75: HashMap resizes and rehashes at 75% capacity.
Java 8 features: streams (pipeline: filter, map, flatMap, reduce, collect; terminal operations trigger processing), lambda expressions ((params) -> expression, making functional interfaces usable inline), Optional (wraps nullable; use orElse, orElseGet, orElseThrow; avoid Optional.get() without isPresent()), method references (ClassName::method, this::method, ClassName::new).
Multithreading: synchronized (mutual exclusion at method or block level), volatile (visibility guarantee, not atomicity), CompletableFuture (asynchronous chaining: thenApply, thenCompose, thenCombine, exceptionally), thread pools via ExecutorService (newFixedThreadPool for bounded concurrency, newCachedThreadPool for elastic short-lived tasks).
JVM: heap vs stack (heap: objects, shared; stack: method frames and local variables, one per thread), G1GC (default since Java 9: divides heap into regions, incrementally collects, low-pause).
Spring Boot and Microservices Questions in Indian Java Interviews
Spring Boot auto-configuration: at startup, Spring Boot scans classpath dependencies and conditionally creates beans. spring-boot-starter-web pulls in Spring MVC + embedded Tomcat + Jackson. Eliminates most XML configuration via @SpringBootApplication, which combines @Configuration, @EnableAutoConfiguration, and @ComponentScan.
Dependency injection types: constructor injection (recommended: explicit, immutable, testable without Spring container), setter injection (optional dependencies), field injection (@Autowired on field: convenient but hidden dependencies, harder to test).
Bean stereotypes: @Component (generic), @Service (business layer), @Repository (data layer: translates persistence exceptions to Spring's DataAccessException hierarchy), @Controller (web layer, returns views), @RestController (@Controller + @ResponseBody).
Microservices patterns: service discovery (Eureka: services register themselves; clients discover by name), API gateway (Spring Cloud Gateway: single entry point, routing, rate limiting, auth), Feign (declarative HTTP client: annotate an interface, Spring generates the implementation), circuit breaker (Resilience4j @CircuitBreaker: opens when failure rate exceeds threshold, provides fallback, half-opens after a wait to test recovery).
Spreading read: Kafka (asynchronous, event-driven communication between services), Redis (caching to reduce database load), JPA/Hibernate with lazy vs eager loading.
Java Coding Questions in Indian Tech Interviews
Common Java coding questions: (1) Two Sum / Three Sum: use HashMap for complement lookup (O(n) time). (2) Reverse a linked list iteratively and recursively. (3) LRU Cache: extend LinkedHashMap with accessOrder=true, override removeEldestEntry to limit size; or implement with HashMap + doubly linked list. (4) Implement a blocking queue: use an array with two pointers (head, tail), a lock, and two conditions (not-full, not-empty); put() waits when full; take() waits when empty. (5) Find all permutations of a string: backtracking; swap elements, recurse, swap back.
Java-specific output questions interviewers use: Integer cache (Integer.valueOf(127) == Integer.valueOf(127) is true because values -128 to 127 are cached; Integer.valueOf(128) == Integer.valueOf(128) is false, different objects), String pool (String literal = pool; new String('abc') = heap object; intern() adds to pool), static initialisation order (parent class static blocks run before child), interface default methods (Java 8+: an interface can have a default method with a body; if a class implements two interfaces with the same default method, it must override).
Practise Java developer interviews with HireStepX's AI voice interviewer. Get scored feedback on Core Java, Spring Boot, and system design answers. First 2 sessions free.
Practice freeJava Interview Differences Between IT Services and Product Companies in India
IT services companies (TCS, Infosys, Wipro, Cognizant, HCL): Core Java basics, Spring MVC, JDBC/Hibernate, REST API CRUD. Coding: LeetCode easy. System design: not expected at junior to 2-year level. Format: often MCQ + coding test (AMCAT, Cocubes, company-specific) + 1-2 technical rounds.
Product companies (Flipkart, Swiggy, Razorpay, Zepto, Meesho): Core Java + Java 8+ (streams, CompletableFuture), Spring Boot with microservices patterns (Feign, Resilience4j, service discovery), system design at SDE-1 level (basic distributed systems), coding (LeetCode medium to hard). Format: 2-4 technical rounds + design round for SDE-2+.
FAANG India (Amazon, Google, Microsoft): LeetCode medium to hard, system design (for SDE-2+), Java concurrency internals (ConcurrentHashMap implementation, compare-and-swap, Java memory model), object-oriented design round. Format: 4-6 technical rounds.
Preparation priority: for IT services: focus on Core Java fundamentals and Spring MVC basics. For product companies: add Java 8 streams, Spring Boot microservices, and LeetCode medium. For FAANG: add system design and Java concurrency depth.
Frequently asked questions
Explore more