I applied through a staffing agency. The process took 2 weeks. I interviewed at GenXComm (Gurgaon, Haryana) in Feb 2023
Interview
Dependency Injection Benefit of Dependency Injection? What is AOP? What are cross cutting concerns? Exception Handling in SpringBoot? What are profiles in Spring? How to handle distributed transactions? Atomic transaction: How to implement caching in microservices? Distributed caching
Interview questions [1]
Question 1
How do Web applications maintain state? How do Web applications maintain state? 1. The cleanest way to do this in Spring is with a session-scoped spring bean. Instances of the bean will be private to the session, and will be instantiated and managed by Spring when each session starts. This bean can hold your conversation state. Under the covers, this mechanism uses standard HttpSession attributes, but it means your code doesn't have to deal with HttpSession directly, so it's cleaner overall. 2. HTTP is a stateless protocol. This means that user data is not persisted from one Web page to the next in a Web site. One way to maintain state is through the use of cookies. Cookies store a set of user specific information, such as a reference identifier for a database record that holds customer information Sessions are more secured compared to cookies, as they save data in encrypted form. Cookies are not secure, as data is stored in a text file, and if any unauthorized user gets access to our system, he can temper the data. Circuit breaker design pattern: https://medium.com/javarevisited/what-is-circuit-breaker-in-microservices-a94f95f5e5ae Lambda types: Consumer, BiConsumer, Producer Thread states: * NEW. A thread that has not yet started is in this state. * RUNNABLE. A thread executing in the Java virtual machine is in this state. * BLOCKED. A thread that is blocked waiting for a monitor lock is in this state. * WAITING. ... * TIMED_WAITING. ... * TERMINATED. If 10 threads are waiting, which thread does notify wake? For all threads waiting on this object's monitor (by using any one of the wait() methods), the method notify() notifies any one of them to wake up arbitrarily. The choice of exactly which thread to wake is nondeterministic and depends upon the implementation. If we use notifyAll() method and multiple threads are waiting for the notification then all the threads got the notification but execution of threads will be performed one by one because thread requires a lock and only one lock is available for one object. notifyAll method wakes up all the threads waiting on the object, although which one will process first depends on the OS implementation. Why use generics? ArrayList vs LinkedList Why do we need OOPs?