Java Spring Boot Interview Questions: Core Fundamentals

Recently attended a Java + Spring Boot interview (3–4 yrs experience). Sharing some key questions that were asked: • HashMap → key-value, hashing, not thread-safe • HashMap vs ArrayList vs HashSet → map vs list vs unique set • @Primary vs @Qualifier → default bean vs specific bean • Consumer vs Supplier → input/no return vs no input/returns • Java 8 → Lambda, Streams, Functional Interfaces • Functional Interface → single abstract method • Exception Handling → try-catch-finally • Concurrent Modification → modifying during iteration • Lazy Loading → loads only when needed • equals() vs hashCode() → content vs hash logic • String vs StringBuilder vs StringBuffer → immutable vs mutable vs thread-safe • Multithreading & Synchronization → parallel execution + control • volatile → visibility across threads • @Transactional → DB transaction management • Lazy vs Eager → on-demand vs immediate loading • N+1 problem → multiple unnecessary DB queries • @RestController vs @Controller → JSON vs view • Global Exception Handling → @ControllerAdvice • JVM memory → Heap, Stack • Garbage Collection → automatic cleanup • Coding: Group Anagrams → [eat, tea, ate], [tan, nat], [bat] Good focus on core Java, collections, and Spring Boot fundamentals. #Java #SpringBoot #InterviewExperience #JavaDeveloper #BackendDeveloper #ExperiencedHire #CareerGrowth

were you interviews remote or in person? this is a good list

Like
Reply

great interview share. the N+1 problem and lazy vs eager loading combo is a classic trap. also volatile keyword question is underrated since most devs dont fully understand happens-before relationship in JMM. group anagrams with sorting as key is a clean O(n*klogk) solution

Like
Reply

Great insights! 🙌 Covers key Java & Spring Boot concepts interviewers actually ask. Very useful for preparation 🚀

Which company did you give an interview for?

Like
Reply

Great insights! 👏🏻 thanks for sharing.

See more comments

To view or add a comment, sign in

Explore content categories