Interviewquestion
60+ interviews in 2 months.
These 5 questions came up in almost EVERY single one:
- "How does HashMap work internally?"
Not "what is a HashMap." They want a hashing function, bucket index calculation, collision handling (Java 8 treeification at 8 entries + capacity ≥ 64), resize behavior, and the hashCode/equals contract.
This question appeared in 90% of my Java interviews. If you can only prepare one topic—make it this one.
- "What happens when you annotate a method with @Transactional?"
They don't want to hear: "It wraps the method in a transaction." They want: Spring creates a PROXY. The proxy intercepts the call, opens a transaction, and commits or rolls back.
The killer follow-up: "What happens if you call a @Transactional method from within the same class?" — It bypasses the proxy. The transaction doesn't apply. This one catches 90% of candidates.
- "Design a system for [X]. What database would you use and why?"
Every system design round. Every time. The "and why" is where most people fail.
They don't want you to say, "I'll use PostgreSQL because it's popular." They want: "My access pattern is read-heavy with key-value lookups, so DynamoDB for sub-ms latency. For full-text search, ElasticSearch. For transactions, PostgreSQL."
Access pattern first. Database second. Always.
- "Your API is slow under load. How do you debug it?"
The junior answer: "Add a cache." The senior answer: "First, I check WHERE the bottleneck is. APM metrics → Is it the app, the DB, or an external API? Then EXPLAIN ANALYZE for DB. Thread pool analysis for the app. Circuit breaker for external dependencies."
Starting with observability instead of jumping to solutions—that's senior thinking.
- "Tell me about a system you built and the trade-offs you made."
This isn't a behavioral question. It's a system design question in disguise. They want to hear the problem, YOUR architecture decision, what you traded away, and the measurable result.
Not: "I built a REST API with Spring Boot." That's a feature. Not a story.
I documented every question from every interview I gave. This list of 5 is the distilled version—the ones that come up regardless of company, role, or round.
Master these 5. You'll walk into 80% of senior interviews feeling prepared