Hi everyone,
I recently had a technical interview for a Backend Engineer role (2 YOE). The focus was heavily on Core Java, Spring Boot, Microservices, and basic troubleshooting.
I'm sharing the questions below. Feel free to discuss.
I. Core Java, Data Structures, and Troubleshooting
1)What is the difference between a JRE, JVM, and JDK?
2)Can you tell me the differences between List, TreeSet, and HashMap? (Focus on ordering, duplicates, and internal structure).
3)Does HashMap store duplicate values? (Explain the context of keys vs. values).
4) The application is not starting and is immediately throwing an Out-of-Memory Exception (OOM). How do you resolve this issue at the most basic level?
5) Are you familiar with the concept of a Dead Letter Queue (DLQ) in messaging systems?
II. Architecture and Frameworks (Spring Boot / Microservices)
1)Do you know about Aspect Oriented Programming (AOP)?
2)Define Dependency Injection (DI) and explain its relationship with AOP in the Spring ecosystem.
3) JPA/Hibernate: You have a JPA Entity with 10 fields. You need to prevent two of those fields from being persisted (saved) to the database. How do you achieve this without using an annotation?
4) Kafka/Pub-Sub: You publish an event to a Kafka topic, and you have two consumer pods running. How do you ensure that only one pod processes the message and avoid duplicate processing?
III. Coding Challenge (Java Streams/Collections)
The Problem: You are given a List (with attributes: ID, Name, Runs, Team).
Task: Write a function to return a List containing the player who scored the highest runs from each unique team.
Requirement: The interviewer strongly preferred an optimized solution using Java Streams and Collectors.
Hope it gives some Insights for the candidates who are will be/in loop.