Java Interview Questions in Gurgaon
36 practice questions with answers for Java interviews in Gurgaon.
Java jobs in Gurgaon
Gurgaon (Gurugram) is home to many multinational, consulting, fintech and consumer-internet offices. Interviews often expect strong business understanding along with technical skills, especially for analytics and product-facing roles.
Below are 36 questions that match the mix of service, product and domain employers hiring java developers in Gurgaon.
What are the primitive data types in Java and their sizes?
Show answer
A counter shared between threads shows wrong totals. How do you fix it?
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
Explain the entity lifecycle states in JPA.
Show answer
You need to add a new payment method to a system that has a big if-else on payment type. How would you redesign it?
Show answer
Write Java code to reverse an integer without converting it to a string.
Show answer
How do you create a custom exception and when should you?
Show answer
Bind typed configuration properties with validation in Spring Boot.
Show answer
You need a cache that evicts the least recently used item when full. How would you build it in Java?
Show answer
What are sealed classes and how do they help?
Show answer
Implement a producer-consumer using BlockingQueue.
Show answer
When would you choose ArrayDeque over Stack and LinkedList?
Show answer
Does the finally block always execute?
Show answer
What is the difference between checked and unchecked exceptions?
Show answer
Implement an LRU cache using LinkedHashMap.
Show answer
What are virtual threads and when should you use them?
Show answer
What is a functional interface?
Show answer
What is the difference between JPA, Hibernate and Spring Data JPA?
Show answer
A team member chains Optional.get() everywhere and gets NoSuchElementException. What do you suggest?
Show answer
What are text blocks in Java?
Show answer
What is the first level and second level cache in Hibernate?
Show answer
What is constructor chaining?
Show answer
What is exception chaining?
Show answer
What is the difference between lazy and eager loading?
Show answer
What is garbage collection and how does the JVM decide an object is garbage?
Show answer
What are method references? Give the four types.
Show answer
What does effectively final mean for lambdas?
Show answer
You have to process tasks in order of priority. Which collection do you use?
Show answer
How do you make sure database changes are released safely?
Show answer
Your Spring Boot service takes 40 seconds to start in Kubernetes and pods get killed. How do you fix it?
Show answer
What is the difference between List.of(), Arrays.asList() and Collections.unmodifiableList()?
Show answer
What is CompletableFuture and how is it better than Future?
Show answer
Compare String, StringBuilder and StringBuffer.
Show answer
You must expose configuration that differs between dev, QA and production. How do you manage it?
Show answer
Write code that runs 10,000 blocking tasks using virtual threads.
Show answer
Companies with offices in Gurgaon (3)
Frequently asked questions
Which companies hire Java professionals in Gurgaon?
Companies with large offices in Gurgaon include Accenture, Amazon, SAP. Use their company pages below to practise employer-specific sets.
Are Java interviews in Gurgaon different from other cities?
The questions depend more on the company than the city. Gurgaon's mix of employers decides the style: Interviews often expect strong business understanding along with technical skills, especially for analytics and product-facing roles
How do I find Java jobs in Gurgaon?
Shortlist companies with Gurgaon offices, keep your CV focused on Java projects, apply on company career pages and job portals with the Gurgaon filter, and practise the questions on this page before each interview.