How to Prepare for an IBM Java Developer Interview
By Preeti Verma
This guide summarizes interview experiences that candidates have shared publicly for Java developer roles at IBM, roughly two to five years of experience. Teams and formats vary, so use this to shape your preparation rather than to predict exact questions.
What the process usually looks like
Most candidates describe:
- An online coding test, usually two problems on HackerRank in about 45 minutes.
- One or two technical rounds covering Java theory, Spring Boot and DSA.
- A managerial round.
Some teams also run a separate 20-question MCQ round specifically on Spring Boot and microservices. One candidate described being scored out of 5 on Java, Spring Boot, testing, MySQL and microservices, with a bar of 3 overall, and being rejected mainly for weak Spring Boot internals and no JUnit or Mockito experience, so do not treat testing knowledge as optional.
Core Java
- OOP concepts with examples from your own code, not textbook definitions. Interviewers push for a real example over a memorized one.
- Deep copy versus shallow copy, and which Object class methods are involved (clone(), and the Cloneable interface).
- How HashMap works internally, and how rehashing works specifically, not just the general put and get flow. See our HashMap internals guide for the full explanation.
- Multithreading and the Executors framework, and what happens if you call run() instead of start() on a Thread (it executes on the current thread, synchronously, with no new thread created).
- The Java 8 features, demonstrated by solving a few problems with the Streams API live.
- What happens when you add duplicate strings to a HashSet, and why (equals() and hashCode() decide it is already present, so the add is a no-op).
- Exception handling keywords, and the difference between throw and throws.
- Can you throw an exception from a static block? Yes, and it prevents the class from loading, which triggers an ExceptionInInitializerError on first use.
- Can a try-catch have more than one finally block? Not attached to the same try, but nested try-finally blocks are possible; this question checks precision more than depth.
- Merge two sorted arrays, live, and explain how the left-shift operator works as part of the same conversation.
Spring Boot
This is where the MCQ round candidates report focuses heavily:
- Why Spring Boot over plain Spring? Auto-configuration, starters, an embedded server, and production-ready features out of the box.
- Can you replace the embedded Tomcat server? Yes, by excluding the Tomcat starter and adding Jetty or Undertow instead.
- @RestController versus @Controller.
- The IoC container, and which annotations enable dependency injection.
- Spring bean scopes, and when you would use each one.
- Given a service class's code, how many beans get created? A question about understanding component scanning and bean registration, not just definitions.
- What Spring Boot Actuator can do in production, and the security implication of exposing it carelessly.
- The main annotations explained in detail, including what the annotation on the main class actually does under the hood (it is a meta-annotation combining @Configuration, @EnableAutoConfiguration and @ComponentScan).
- Which JUnit and Mockito annotations you use, and what each one does, directly tied to the earlier point about testing knowledge mattering.
Hibernate and SQL
Lighter here than other companies: connection pooling configuration in Hibernate, how indexing works and when to add one, the difference between a primary key and a unique key, and a query to find employees with the second-highest salary (know how it handles ties, and be ready for a follow-up asking for the Nth highest).
Microservices and Kafka
- Advantages of a microservice architecture, and its costs, asked as a pair, not just the benefits.
- Which lightweight protocol microservices commonly use to talk to each other.
- The pattern that stops one failing service from cascading failures (Circuit Breaker), and how it decides when to let traffic through again (the half-open state).
- Ways to call a REST API from another microservice: RestTemplate, Feign, WebClient.
- What an API Gateway does, and what breaks without one.
- Client-side load balancing in Spring Boot on the cloud.
- Read timeout versus connection timeout, and how you set each.
- Which HTTP method is safe and idempotent for fetching a resource (GET), and why that property matters for retries.
- Kafka experience in your own projects, asked directly, so have a specific, concrete example ready rather than a general description.
Design patterns
Two are commonly asked as quick identification questions: which pattern defines a family of interchangeable algorithms (Strategy), and which pattern adds behavior to an object at runtime (Decorator).
DSA problems reported at IBM
The stock span problem, flattening a linked list with next and child pointers, finding common elements across three sorted arrays, maximum sum increasing subsequence, Dijkstra's algorithm for shortest path (sometimes asked as pseudocode rather than full code), implementing merge sort, implementing a Fenwick tree, longest common subsequence (reported in an online test), and palindromic string problems.
How to prepare
Given how much weight several candidates place on Spring Boot internals and testing, do not treat these as secondary to DSA the way you might for a more DSA-heavy company. A reasonable split: about 40% Spring Boot and Java fundamentals, 30% microservices and design patterns, 30% DSA practice from the list above.
We organized these questions, rewritten as realistic scenarios, along with the reported DSA problems, in the IBM sheet, with the first three questions free to preview. For the Spring Boot internals specifically, see our Spring Boot interview scenarios guide.