SDE2 Interview Questions at Infosys
11 real SDE2 interview questions asked at Infosys. Covers Technical, System Design, HR, Scenario rounds. Sourced from engineers who cleared the loop.
Interview Signals — What Infosys Asks SDE2s
All SDE2 Questions Asked at Infosys
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.
Explain REST API best practices. What makes an API RESTful? Cover: proper use of HTTP verbs, status codes, versioning strategies (/v1/users vs Accept header), pagination (cursor vs offset), and HATEOAS.
A React form with 30 fields re-renders every field on every keystroke in any single field. No memoization exists. You cannot refactor to a form library. Fix it with minimal code changes.
A useEffect in your component is firing infinitely. The dependency array contains an object fetched from an API. You cannot change the API response. How do you stop the infinite loop?
Infosys works with large enterprise clients. Describe a time you had to explain a complex technical decision to a non-technical stakeholder. How did you frame it and what was the outcome?
Explain the difference between JDK, JRE, and JVM. How are they related? Describe the JVM internals: class loader, bytecode verifier, interpreter, JIT compiler, garbage collector, and how they work together to run a Java program.
Practice these questions with AI feedback
Get instant grading on your answers, identify your weak areas, and generate a personalised 14-day study plan — all free.
Build my study plan →