Java Interview Questions in Chennai
36 practice questions with answers for Java interviews in Chennai.
Java jobs in Chennai
Chennai is a long-standing IT-services and SaaS hub along OMR, with strong demand for testing, data and support-engineering roles. Many companies here hire freshers in large batches and train them on the job.
Below are 36 questions that match the mix of service, product and domain employers hiring java developers in Chennai.
What is the difference between an abstract class and an interface in modern Java?
Show answer
What is the difference between lazy and eager loading?
Show answer
Write a Java program to check whether a number is prime.
Show answer
Tell me about a time you optimised a slow database query.
Show answer
What is the difference between Collectors.toMap() and groupingBy()?
Show answer
What are the ways to create a thread in Java?
Show answer
Write code that runs 10,000 blocking tasks using virtual threads.
Show answer
What is the difference between final, finally and finalize?
Show answer
Why does Java not support multiple inheritance of classes?
Show answer
Write code to check if two strings are anagrams.
Show answer
Implement the Builder pattern for a User class with many optional fields.
Show answer
What is the difference between synchronized and ReentrantLock?
Show answer
Explain pattern matching for switch and record patterns in Java 21.
Show answer
Write a unit test for a service class using JUnit 5 and Mockito.
Show answer
How does @Transactional work and what are its common pitfalls?
Show answer
What is the difference between reduce() and collect()?
Show answer
A query is fast in development but takes 8 seconds in production. How do you investigate?
Show answer
What is the Liskov Substitution Principle? Give an example of breaking it.
Show answer
Tell me about a time a production incident happened because of your code.
Show answer
Explain the SOLID principles briefly.
Show answer
Which JVM flags would you set to start a production service with a 4 GB heap, G1 and a heap dump on OOM?
Show answer
You must expose configuration that differs between dev, QA and production. How do you manage it?
Show answer
Run two tasks in parallel with CompletableFuture and combine their results.
Show answer
An API listing 100 orders fires 101 SQL queries. How do you fix it?
Show answer
Show runtime polymorphism with a simple Java example.
Show answer
Describe a time you improved the design of existing code.
Show answer
Using streams, find the employee with the highest salary in each department.
Show answer
Find the second highest salary from a list of employees using streams.
Show answer
Map a one-to-many relation between Order and OrderItem in JPA.
Show answer
What is the difference between method overloading and method overriding?
Show answer
What is a functional interface?
Show answer
Two users booking the last seat both succeed. How do you prevent double booking?
Show answer
Write a record with validation in its compact constructor.
Show answer
What does the var keyword do and where can it not be used?
Show answer
Users get LazyInitializationException when the API returns an entity. What is happening?
Show answer
Companies with offices in Chennai (11)
TCS
Java interview questions
Mumbai, Chennai, Pune +2
View questionsInfosys
Java interview questions
Bengaluru, Mysuru, Pune +2
View questionsWipro
Java interview questions
Bengaluru, Hyderabad, Pune +2
View questionsCognizant
Java interview questions
Chennai, Bengaluru, Pune +2
View questionsCapgemini
Java interview questions
Mumbai, Bengaluru, Pune +2
View questionsHCLTech
Java interview questions
Noida, Chennai, Bengaluru +2
View questionsTech Mahindra
Java interview questions
Pune, Hyderabad, Bengaluru +2
View questionsLTIMindtree
Java interview questions
Mumbai, Pune, Bengaluru +2
View questionsAmazon
Java interview questions
Bengaluru, Hyderabad, Chennai +2
View questionsBarclays
Java interview questions
Pune, Chennai, Noida +1
View questionsZoho
Java interview questions
Chennai, Tenkasi
View questionsFrequently asked questions
Which companies hire Java professionals in Chennai?
Companies with large offices in Chennai include TCS, Infosys, Wipro, Cognizant, Capgemini, HCLTech, Tech Mahindra, LTIMindtree, Amazon, Barclays. Use their company pages below to practise employer-specific sets.
Are Java interviews in Chennai different from other cities?
The questions depend more on the company than the city. Chennai's mix of employers decides the style: Many companies here hire freshers in large batches and train them on the job
How do I find Java jobs in Chennai?
Shortlist companies with Chennai offices, keep your CV focused on Java projects, apply on company career pages and job portals with the Chennai filter, and practise the questions on this page before each interview.