🔤 Arc A — Java Fundamentals
Core syntax: type declarations, string utilities, control flow, loops, arrays, and StringBuilder. These patterns appear in every arc and every interview.
🏛️ Arc B — OOP
Records, classes, interfaces, abstract classes, inheritance, encapsulation, and method overriding — the building blocks of every Spring Boot service.
⚡ Arc C — Functional & Modern Java
Collections, generics, lambdas, method references, Stream pipelines, Optional, try-with-resources, and custom exceptions.
🌱 Arc D — Spring Boot
Application bootstrap, REST controllers, dependency injection, validation, error handling, security, and config management.
🗄️ Arc E — Databases
JPA entities, relationships, Spring Data repositories, JPQL queries, transactions, and raw JdbcTemplate access.
🧪 Arc F — Testing
Unit tests with JUnit 5 and Mockito — from basic assertions to parameterized tests and mock verification.
🤖 Arc G — Java + AI
Calling Ollama with the Java HttpClient, using Spring RestClient, building a simple RAG retrieval step, and templating prompts with a PromptTemplate record.
📋 Quick Reference Table
Ten concepts you must know cold for Java backend interviews.
| Concept | Annotation / Class | Arc | Key Method / Usage |
|---|---|---|---|
| REST Controller | @RestController |
D | @GetMapping, @PostMapping, @PathVariable |
| Service Layer | @Service |
D | @Autowired repo; business logic; called by controller |
| JPA Entity | @Entity |
E | @Id, @GeneratedValue, @ManyToOne |
| JPA Repository | JpaRepository<T,ID> |
E | findAll(), findById(), save(), delete() |
| Transaction | @Transactional |
E | rolls back on RuntimeException; use on service methods |
| Mock Object | @Mock |
F | when(mock.method()).thenReturn(val) |
| Unit Test | @Test |
F | assertEquals, assertThrows, assertAll |
| Stream Pipeline | Stream<T> |
C | filter(), map(), collect(), groupingBy() |
| HTTP Client | HttpClient |
G | HttpRequest.newBuilder(), client.send() |
| REST Client | RestClient |
G | rest.post().uri().body().retrieve().body() |
✅ Key Takeaways
- Prefer
recordfor immutable data carriers; useclasswhen you need mutability or inheritance. - Stream pipelines are lazy — no work happens until a terminal operation (
collect,count,forEach) is called. - Spring's three-tier pattern —
@RestController→@Service→@Repository— separates concerns and makes every layer independently testable. @Transactionalon a service method enlists all repository calls in one ACID transaction; an unchecked exception triggers an automatic rollback.- With Mockito, always verify that mock interactions happened the expected number of times using
verify(mock, times(n)).method()orverify(mock, never()).method(). - Any Java app can call a local LLM via the built-in
HttpClient; Spring Boot apps can useRestClientfor a cleaner, fluent API.
Ready to build Java AI services?
Join the Best AI Programs — three 5-month courses, fully online, with placement assistance. Week 1 is free.
Explore our AI-era courses →