Recently Appeared for Nagarro Interview sharing my experience
I recently attended an interview at Nagarro for a Java Backend role.
Core Java
- Difference between abstract class and interface
- what are default methods in interfaces?
- What happens if two interfaces have same default methods?
- Difference between Comparator and Comparable
- HashMap & TreeSet internally working
Multithreading & Concurrency
6. Runnable vs Callable – when to use which?
7. What is the volatile keyword in Java?
8. Explain ConcurrentHashMap (internal working)
9. Compeltable Future & Future
10. Write Even Odd program using wait notify
Java 8 Features
11. What are terminal vs intermediate operations in Streams?
12. Stream vs Parallel Stream internal working of stream.
He Asked Scenario Baed Question
-
Your API is handling 1000k+ requests/sec and performance is degrading. How would you scale and optimize it?
-
You are building a payment API and receiving duplicate requests. How will you ensure idempotency?
-
Money is deducted from the account but order creation fails. How will you ensure data consistency?
-------------------------------------------SpringBoot & Microservices
What is auto-configuration in Spring Boot? How does it work? -
What is the use of @SpringBootApplication?
-
What are Spring Boot starters?
-
What is dependency injection? Types?
-
How do you validate request payloads?
-
How does Spring Boot auto-configure beans?
-
How will you implement caching?
-
How will you design a scalable system in Spring Boot?
-
ApiGateway, LoadBalancer
-
Which Design pattern you have used recently?
-------------------------------------------Coding Questions -
Largest odd lenth string
-
Minimum steps to reach stairs
-
2nd non repeating using Streams Java8
-
Group Employee by department and their roles
-
Mergesort code
-
Longest non repeating substring
-
Largest subarray with sum 0


