Interview questions for Java developers with two to five years of experience: intermediate Core Java, Java 8 and concurrency, memory management, advanced Stream API coding, Spring Framework and Spring Boot in depth, scenario-based Spring Boot questions, Spring Security, Kafka, JUnit and Mockito, and Maven/Gradle/Git and deployments. Starts with a rapid revision of the fresher tier.
Rapid revision of every fresher-level question, with one-line answers and links to the full answers.
Overloading and overriding edge cases, inner classes, enums, generics and type erasure, collections internals, class loading, memory and exception design.
Lambdas and functional interfaces, default methods, Optional, stream internals, collectors, parallel streams and level-2 stream coding problems.
synchronized vs ReentrantLock, volatile, deadlocks, ExecutorService, thread pools, ThreadLocal, ConcurrentHashMap internals and thread dumps.
Bean lifecycle, BeanFactory vs ApplicationContext, circular dependencies, qualifiers, transactions, AOP, Spring Batch and Mockito spies.
Auto-configuration internals, configuration and secrets, data and caching, testing and deployment, performance, async and events, security, observability and integrations.
Filter chain, SecurityContext, OAuth2 and grant types, CORS and CSRF, method security, SpEL rules, password storage, sessions and testing.
Architecture, topics and partitions, ZooKeeper and KRaft, producers and consumers, reliability, Streams, Connect, security and production scenarios.
Advanced Git workflows and recovery, Maven dependency resolution, multi-module builds and profiles, and Gradle builds, caching and plugins.
Session clustering, CI/CD pipelines with Jenkins, rollbacks, secrets, database migrations, zero-downtime releases, health checks, containers and monitoring.
JUnit lifecycle, assertions, parameterized and parallel tests, and Mockito mocks, spies, stubbing, verification, captors and static mocking.