
MasterCard


MasterCard Technical Lead Interview Questions and Answers
Q1. What is difference between Interface and abstract class?
Interface is a contract that defines the methods a class must implement, while abstract class can have both abstract and concrete methods.
Interface cannot have any implementation, while abstract class can have both abstract and concrete methods.
A class can implement multiple interfaces but can only inherit from one abstract class.
Interfaces are used to achieve multiple inheritance in Java, while abstract classes are used to provide a common base for subclasses.
Interfaces are ...read more
Q2. Parent child component communication in react?
Parent child component communication in React involves passing data from parent to child components and triggering events from child to parent components.
Use props to pass data from parent to child components
Use callback functions to trigger events from child to parent components
Context API can be used for passing data to deeply nested components
Q3. Can abstract class instantiated?
No, abstract classes cannot be instantiated.
Abstract classes are meant to be inherited and extended by other classes.
Attempting to instantiate an abstract class will result in a compilation error.
Abstract classes can have abstract methods that must be implemented by the subclass.
Q4. How to optimize react application?
Optimizing a React application involves code splitting, lazy loading, minimizing bundle size, using memoization, and optimizing render performance.
Implement code splitting to load only necessary code for each route or component.
Utilize lazy loading to defer loading of non-essential components until they are needed.
Minimize bundle size by removing unused code, optimizing images, and using tree shaking.
Use memoization techniques like useMemo and useCallback to avoid unnecessary...read more
Q5. What is useRef, useMemo, useCallback?
useRef is used to persist a value across renders, useMemo is used to memoize expensive calculations, useCallback is used to memoize functions.
useRef is commonly used to access DOM elements or persist values between renders.
useMemo is used to memoize expensive calculations to avoid re-computation.
useCallback is used to memoize functions to prevent unnecessary re-renders.
Example: useRef can be used to store a reference to an input element in a form.
Example: useMemo can be used ...read more
Q6. What is app.use in .net core?
app.use in .NET Core is used to add middleware to the request pipeline.
app.use is a method used in ASP.NET Core to add middleware components to the request pipeline.
Middleware components are software components that are executed in the request pipeline to handle requests and responses.
Middleware components can perform tasks such as authentication, logging, error handling, and more.
Example: app.use(new MiddlewareComponent());
Q7. What is dependency injection?
Dependency injection is a design pattern in which components are given their dependencies rather than creating them internally.
Dependency injection helps in achieving loose coupling between classes.
It allows for easier testing by mocking dependencies.
There are three types of dependency injection: constructor injection, setter injection, and interface injection.
Example: Instead of a class creating an instance of another class it needs, the instance is provided to it through co...read more
Q8. Micro service design patterns
Micro service design patterns are architectural patterns used to design and implement microservices.
Service discovery
Circuit breaker
API gateway
Event sourcing
Saga pattern
Interview Process at MasterCard Technical Lead

Top Technical Lead Interview Questions from Similar Companies








Reviews
Interviews
Salaries
Users/Month

