Infosys SDE2 Interview Guide
Evidence-backed preparation playbook for Infosys SDE2 interviews. 11 reported questions, top topics, difficulty breakdown, and a free assessment.
Know your gaps before the interview
Answer 10 questions from this exact pool. Get a personalised readiness score for Infosys SDE2 and a focused study plan targeting only your weak areas.
Top Questions — Ranked by Community Votes
These 6 questions appeared most in Infosys SDE2 reports. Master these first.
What is the difference between String, StringBuilder, and StringBuffer in Java? When would you use each? Explain immutability, thread safety, performance implications, and give an example where using String in a loop causes excessive object creation.
Explain the Java Memory Model. What are heap and stack? How does garbage collection work? Describe generational GC (Young, Old, Metaspace), GC roots, mark-and-sweep, and how to diagnose memory leaks with tools like VisualVM or jmap.
Your Node.js app has a middleware that adds request logging. In production, every slow request shows the same log message appearing 3 times. Why might this happen?
How do you implement custom validation in Spring Boot? Explain the approach using @Constraint and ConstraintValidator, where to place the annotation, and how to return meaningful error messages through BindingResult.
What are design patterns? Explain Singleton, Factory, and Observer patterns with Java code examples. In which Spring Boot components are these patterns used internally?
Design a library management system. Include entities (Book, Member, Loan), relationships, and key operations: borrow, return, search, fine calculation. Discuss how to handle concurrent borrows of the last copy of a book.