Here are 50-character-or-fewer title options for the LinkedIn post: 1. Java Interview Questions I Faced Recently 2. Java Developer Interview Prep 3. Java Interview Questions and Answers 4. Java Backend Developer Interview Prep 5. Java Spring Boot Interview Questions

🚀 Java Backend Developer (3–6 Yrs) Java Interview Questions I Faced Recently Over the past 15 days, I attended 4–5 interviews, and I came across some really interesting Java-related questions. Maybe this will help you guys 😊 1. Is it possible for a Spring Boot project to contain more than one main method? If yes, which one will execute when we run the project? 2. When we perform operations using Hibernate, how does it work internally? Explain the process. 3. What do you know about AtomicInteger? 4. What are SOLID principles? 5. If we already have a login API and want to add login via OTP, CAPTCHA, or username/password without creating a new API and without modifying the existing one directly, how can we implement this in Spring Boot? 6. What do you know about REST API? 7. What is the difference between @Controller and @RestController? 8. What are the different bean scopes in Spring? 9. What are the types of Dependency Injection in Spring? 10. When should we use the @Transactional annotation in Hibernate, and how can we manage transactions without using it? 11. What is a Bean in Spring, and what is its lifecycle? 12. If an API calls another API sequentially (one-by-one, where the next waits for the previous to complete), what is this model called in Spring Boot? 13. Can you give a real-world example where you implemented SOLID principles in your project? 14. What is Microservices Architecture, and why should we use it instead of Monolithic Architecture? 15. What are the different ways to communicate between microservices? 16. Apart from Feign Client, RestTemplate, and WebClient, what other tools/technologies can be used for communication? (e.g., Apache Kafka, Redis Cache) 17. Design an API with proper layering (Controller, Service, Repository) and implement Global Exception Handling. 18. What annotations have you used in your Spring Boot projects? Give examples. 19. How can we optimize database queries or transactions to improve performance? 20. If a request goes through API Gateway → Controller → Service → Database and is taking too much time, how would you optimize and improve performance? 21. You mentioned Apache Kafka in your resume — what do you know about it? 22. In Hibernate, when using @OneToMany mapping, where do you place the annotation (in which class/variable)? Explain how it works. 23. If APIs execute concurrently (parallel execution), what is this model called? 24. What is Spring Security? What do you know about the Spring Filter Chain? 25. What is the difference between JWT and Session? 26. What is the Singleton Design Pattern? 27. Where is the Singleton Design Pattern used in multithreading? 28. What are the features of Java 21?

To view or add a comment, sign in

Explore content categories