The current advanced path covers concurrency, JVM memory and Spring REST. For broader university, certification-style and interview exams, add the following areas. Some are Core Java language/API topics; framework and tooling questions depend on the syllabus.
1. Java Memory Model and thread safety
A race condition occurs when the result depends on timing between threads. Synchronization provides mutual exclusion and visibility. volatile provides visibility/order guarantees for a variable but does not make compound actions atomic. Use atomic classes, locks or concurrent collections as appropriate.
private final AtomicInteger count = new AtomicInteger();
void increment() { count.incrementAndGet(); }
int current() { return count.get(); }Know happens-before relationships, safe publication, immutable shared state, deadlock conditions, interruption, executor shutdown, Future/CompletableFuture, and the distinction between CPU-bound and I/O-bound workloads.
2. Generics, collections and complexity
Advanced exams may ask about type erasure, bounded wildcards, generic invariance, comparator contracts and hash-based collection internals. Average complexity depends on hash distribution and implementation; state assumptions instead of presenting O(1) as an unconditional guarantee.
static double sum(List extends Number> xs) {
double total = 0;
for (Number x : xs) total += x.doubleValue();
return total;
}Be able to justify a data structure choice and estimate time/space costs. Review arrays, linked lists, stacks, queues, hash tables, trees, heaps, binary search, sorting and graph traversal if algorithms are in scope.
3. JVM internals and performance
Understand class loading (loading, linking and initialization), runtime data areas, stack frames, heap objects, garbage collection, JIT compilation and class metadata. A memory leak can occur when objects remain reachable even though the application no longer needs them.
Use evidence rather than guesswork: inspect CPU and heap profiles, thread dumps, GC logs and allocation rates. Avoid relying on finalization or calling System.gc() as a deterministic cleanup mechanism. Close external resources explicitly.
Common distinction: stack overflow often results from deep recursion or excessive stack use; out of memory means the JVM cannot satisfy an allocation or a relevant memory area is exhausted.
4. Modern Java language features
Know the version boundaries specified by your course. Modern Java may include local-variable type inference (var), switch expressions, text blocks, records, sealed classes, pattern matching and modules. These features do not remove the need to understand classes, interfaces, exceptions and type safety.
record Point(int x, int y) { }
static String describe(Object value) {
return switch (value) {
case String s -> "text: " + s;
case Integer i -> "number: " + i;
case null -> "null";
default -> "other";
};
}Use the exact supported syntax for the configured Java release; some features were preview features before becoming permanent.
5. JDBC transactions and data safety
A transaction groups operations into a unit. Review ACID: atomicity, consistency, isolation and durability. Understand auto-commit, commit/rollback, isolation levels, lost updates, dirty reads and connection/resource lifecycle.
try (Connection c = dataSource.getConnection()) {
c.setAutoCommit(false);
try {
// execute related PreparedStatement updates
c.commit();
} catch (SQLException ex) {
c.rollback();
throw ex;
}
}Production code should also preserve the original exception if rollback fails and restore connection state when connections are pooled. Parameterize SQL; use least-privilege database credentials.
6. Spring Boot REST fundamentals
Know dependency injection, inversion of control, beans, component scanning, configuration, controller/service/repository separation, validation and exception mapping. A REST API should use appropriate HTTP methods and status codes, validate inputs and avoid exposing internal stack traces.
@RestController
@RequestMapping("/api/books")
class BookController {
@GetMapping("/{id}")
ResponseEntity get(@PathVariable long id) {
return service.find(id)
.map(ResponseEntity::ok)
.orElseGet(() -> ResponseEntity.notFound().build());
}
}Also review DTOs vs persistence entities, pagination, idempotency, authentication vs authorization, configuration by environment, integration tests and API documentation. Framework annotations vary by Spring version.
7. Design principles and patterns
Be able to explain SOLID: single responsibility, open/closed, Liskov substitution, interface segregation and dependency inversion. Prefer composition where it makes behaviour easier to vary. Common patterns include Strategy, Factory, Builder, Adapter, Decorator, Observer and Repository.
For an exam answer, give the problem the pattern solves, the participants, a tiny example, and trade-offs. Do not force a pattern where a simple function or class is enough.
8. Build, testing and diagnostics
Review Maven/Gradle dependency management, scopes, reproducible builds, unit vs integration tests, test doubles, parameterized tests and CI. Learn to read stack traces from the first relevant application frame, identify the root cause and reproduce a failure with a small test.
For performance questions, state the workload, measurement method and constraints. Benchmarking needs warm-up and controlled conditions; a single timing run is not reliable evidence.