Interview Prep

Java & Spring Boot Interview Questions

for 3 Years Experience: Real Interview Questions

Interview Prep

How does HashMap work internally?

– hashCode() helps locate a bucket. – equals() helps identify the matching key. – Collisions can happen! Can you explain collision handling?

Interview Prep

Do you know these Java basics?

– Four pillars of OOP – Functional interfaces – Java 8 features Knowing definitions isn't enough. Understand how they work.

Interview Prep

How would you save employee data?

Controller → Service → Repository → Database Can you explain the role of each layer? A practical backend development question.

Interview Prep

Coding Challenge

Count each character in "hello" Expected counts: – h = 1 – e = 1 – l = 2 – o = 1 Can you solve it with a HashMap and without one?

Bonus SQL Question

Can you find the second-highest salary?

SELECT MAX(salary) FROM employee_master WHERE salary < (    SELECT MAX(salary)    FROM employee_master ); Bonus: Understand why this returns the second-highest distinct salary.