Java backend interview topics that come up again and again:
1. OOP basics and SOLID
2. Collections: HashMap internals, ArrayList vs LinkedList
3. equals() and hashCode()
4. Multithreading and concurrency
5. Java 8+ features: streams, lambdas, Optional
6. Spring Boot: dependency injection, beans, auto-configuration
7. REST API design
8. SQL, joins and indexes
9. Transactions and JPA
10. Basic system design
Know these well and most interviews feel a lot easier.
Why software estimates are usually wrong ?
• We estimate the coding, not the testing, reviews and deploys.
• Unknowns only show up once you start.
• We assume no meetings, no bugs, no sick days.
• Requirements change halfway.
• Other teams become blockers.
• Every developer thinks "this one is easy".
What helps:
• Break work into small pieces.
• Give a range, not an exact day.
• Add time for unknowns.
• Re-estimate when you learn more.
Java 27 was officially released on September 15, 2026, with nine JDK Enhancement Proposals (JEPs).
Some changes improve existing applications without requiring code changes. Others are still experimental or preview features.
- Compact Object Headers Are Now Enabled by Default
- G1 Is Now the Default Garbage Collector Everywhere
- Post-Quantum Hybrid Key Exchange for TLS 1.3
- JFR Now Redacts Sensitive Information Inside the JVM
Full article: https://t.co/JBQ9ufCwq0
Spring Boot supports ProblemDetail for error responses:
ProblemDetail pd = ProblemDetail.forStatusAndDetail(
HttpStatus.NOT_FOUND, "Order not found");
You get a standard JSON error format without building your own error class.
You can build a working Spring Boot app in an afternoon. Copy a tutorial, add a few annotations, and your CRUD API runs on localhost:8080.
Then an interviewer asks how Spring creates your beans, or what happens when two requests hit the same row at once. The demo skills stop helping.
Tutorials teach you to make code work. Interviews expect you to know why it works, and what breaks it.
Full Article: https://t.co/iBiCOolHzw
How to ask a good technical question at work ✅
1. Say what you're trying to do.
2. Say what you expected.
3. Say what actually happened.
4. Paste the exact error.
5. Share what you've already tried.
6. Ask one clear question.
Bad: "Hey, the API isn't working."
Good: "POST /orders returns 500 in staging since this morning. Logs show a timeout to the payment service. Config looks the same as prod. Did anything change on payments today?"
Signs you might need a real break from coding ✅
➡️ Small bugs make you angry, not curious.
➡️ You open the laptop and just stare at it.
➡️ You haven't learned anything new in months.
➡️ Sunday evenings feel heavy.
➡️ You're tired even after a good night's sleep.
➡️ You don't care about work you used to enjoy.
👉A weekend off doesn't always fix this. Sometimes you need a proper holiday, an honest talk with your manager, or help from a professional.
✅ Take it seriously. This career is long.
Spring tip: mark read-only service methods like this ✅
@ Transactional(readOnly = true)
public List<Order> findOrders(...)
Hibernate can skip dirty checking, and the next developer knows this method doesn't change data.
Optimistic vs pessimistic locking ✅
Optimistic➡️
• Assumes conflicts are rare.
• Add a version column (@ Version in JPA).
• On update, the version is checked. If someone changed the row, it fails and you retry.
• No locks held. Great for most web apps.
Pessimistic➡️
• Assumes conflicts will happen.
• Locks the row when you read it (SELECT ... FOR UPDATE).
• Others wait until you're done.
• Good for seat booking or stock counts under heavy load.
Start with optimistic. Switch when retries start happening too often.
Transaction isolation levels, simply:
• Read uncommitted: you can see other transactions' unsaved changes. Almost never used.
• Read committed: you only see saved data. Default in Postgres and Oracle.
• Repeatable read: rows you've read won't change during your transaction. Default in MySQL InnoDB.
• Serializable: acts as if transactions ran one by one. Safest, slowest.
What they protect against:
• Dirty read: reading unsaved data
• Non-repeatable read: the same row changes between two reads
• Phantom read: new rows appear when you run the same query again
Check your database's default before assuming anything.
Spring Boot: group your config instead of using many @Value fields.
@ConfigurationProperties(prefix = "payment")
public record PaymentProps(String apiUrl, int timeoutSeconds) {}
Enable it with @ConfigurationPropertiesScan. Type-safe and easy to test.
When to use a message queue instead of a direct API call:
• The work is slow, like sending emails or building reports.
• The user doesn't need the result right away.
• You want automatic retries when something fails.
• Traffic comes in spikes and you want to smooth it out.
• Several services care about the same event.
Stick with a direct call when:
• The user is waiting for the answer.
• You need the result to continue.
• The flow is simple and a queue adds nothing.
Queues add moving parts. Use one when it solves a real problem.
Rate limiting algorithms, simply:
• Fixed window: 100 requests per minute. Simple, but allows bursts at the window edges.
• Sliding window: counts the last 60 seconds at any moment. Smoother.
• Token bucket: tokens refill at a steady rate, each request uses one. Short bursts are fine.
• Leaky bucket: requests go out at a fixed rate, extras wait or get dropped.
Token bucket is the most common for APIs. Bucket4j is a good Java library for it.
Return 429 Too Many Requests, with a Retry-After header if you can.
Logs, metrics and traces. What's the difference?
• Logs: what happened, in detail. "Order 123 failed: card declined."
• Metrics: numbers over time. Requests per second, error rate, latency.
• Traces: the path of one request through every service.
Metrics tell you something is wrong.
Traces show you where.
Logs tell you why.
OpenTelemetry can collect all three, and it works well with Spring Boot.
Request validation in Spring Boot:
record CreateUserRequest(
@NotBlank String name,
@Email String email,
@Min(18) int age
) {}
@PostMapping("/users")
User create(@Valid@RequestBody CreateUserRequest req) { ... }
• Add spring-boot-starter-validation
• @Valid runs the checks
• Invalid input returns 400 automatically
• Handle MethodArgumentNotValidException for nicer messages
• Write custom validators for business rules
Stop bad data at the door, not in the database.