The technical interview mainly focused on problem-solving, SQL, Java fundamentals, and object-oriented programming concepts.
The interviewer first asked me to **sort an array containing only 0s, 1s, and 2s without using any sorting algorithm**. Initially, I solved it by counting the occurrences of 0s, 1s, and 2s using **if-else statements** and reconstructing the array. The interviewer accepted the logic but challenged me to solve it **without using if-else statements**. I then used a **HashMap-based approach**, and the interviewer was satisfied with my solution.
The interviewer also asked an SQL question to **find the second highest salary** from an employee table.
In addition, there were several Java and database-related questions, including:
* Difference between **JDK, JRE, and JVM**
* Core **OOP concepts** such as Encapsulation, Inheritance, Polymorphism, and Abstraction
* Basic Java programming concepts
* Basic **MySQL** concepts and queries
Overall, the interview was focused on assessing my problem-solving ability, Java fundamentals, SQL knowledge, and understanding of object-oriented programming.