Zensar Technology Interview Questions For a Java Developer
I appeared in Zensar Technology interview for a Java Developer role.
Below are the questions asked in the interview.

Coding Questions
1- You have given an input array = {12, 3, 4, 1, 6, 9}, target sum = 24, output (3,9,12) 3 + 9 +12 = 24
2- String str = “Test Java With Java 8”;
Check if there is any duplicate word inside the string using the stream api.
3- What will be the output of the below code?
Set<Employee> empSet = new HashSet<>();
empSet.add(new Employee(1, "Ram", "Bengaluru"));
empSet.add(new Employee(1, "Ram", "Bengaluru"));
System.out.println(empSet.size());
4- What will be the output of the below code?
String s = null;
String s1 = "Java";
System.out.println(s +s1);
Database Interview Questions
1- Find the 3rd largest salary in SQL?
2- Find 2nd largest salary in SQL without using limit and offset?
3- What is ACID property?
4- Difference between TRUNCATE and DELETE?
5- Difference between function and procedure?
Java Related Questions
1- What is the use of default and static methods in an interface?
2- Record class vs Lombok, which one is preferable?
3- Put request idempotent or not?
4- Comparator vs comparable. How to implement?
5- What is the CQRS design pattern when used?
6- What is bean scope in Spring Boot? How many types?
7- Can we overload and override the final method?
8- If your api is getting an error on production, what are the steps follow to resolve?
9- Difference between hashtable, hashMap, concurrentHashMap. Which one is used in which scenario?
10- Map vs flatMap which scenarios flatmap used in real time?
11- What is Accumulators in stream API?
12- What collectors.groupBy() function do?
Please clap if you found this article useful !
Zensar Technology Interview Questions For a Java Developer was originally published in Javarevisited on Medium, where people are continuing the conversation by highlighting and responding to this story.
This post first appeared on Read More

