Mphasis
400+ Interview Questions and Answers
You have been given a long type array/list 'ARR' of size 'N'. It represents an elevation map wherein 'ARR[i]' denotes the elevation of the 'ith' bar. Print the total amount of rainwater that...read more
What is a singleton class.
What are design patterns.
Explain the diamond problem in Java.
Will Java be able to sustain its ecosystem in the future?
What is static and dynamic binding.
Q3. 1. All types of database commands- DDL, DML, DCL, TCL 2. Write a java code to reverse a given string or sentence 3. Questions based on a major and minor project 4. Questions based on Industrial Training/Interns...
read moreInterview questions for Associate Software Engineer position
Be familiar with all types of database commands and their usage
Practice writing code to reverse a given string or sentence in Java
Be prepared to discuss major and minor projects, as well as industrial training/internship experiences
Have a good understanding of operating system concepts such as job scheduling, deadlock, and starvation
Know the differences between C++ and Java programming languages
Be able to implement l...read more
How can you create a Singleton class in Java?
What is index hunting?
What are semaphores.
What is a binary semaphore?
What is a 3 tier architecture in DBMS ?
Difference between shared and exclusive lock?
Use of profiles in sprin...read more
What are the main return types supported in Web API?
Q7. Why Mphasis? What do you know about us?
Mphasis is a leading IT solutions provider with a focus on digital transformation.
Mphasis has a strong presence in the banking and financial services industry, providing innovative solutions to clients such as Citibank and Standard Chartered.
The company has a focus on digital transformation and offers services such as cloud computing, data analytics, and artificial intelligence.
Mphasis has won several awards for its work in the IT industry, including the NASSCOM Customer Serv...read more
What is different between REST API and RESTful API?
Q9. Write a program for multiple inheritances?
A program for multiple inheritances
Create a base class with common attributes and methods
Create derived classes that inherit from the base class
Use multiple inheritance to inherit from multiple base classes
Resolve any naming conflicts using scope resolution operator (::)
Example: class Derived: public Base1, public Base2 {}
Example: class Derived: public Base1, public Base2 { public: void method() { Base1::method(); Base2::method(); } }
When can a Factory Pattern be used ?
How does Index hunting help in improving query performance?
Q12. What is the difference between structure and union?
Structure is a collection of variables of different data types while union is a collection of variables of same data type.
Structure allocates memory for all its variables while union allocates memory for only one variable at a time.
Structure is used when we need to store different types of data while union is used when we need to store only one type of data.
Example of structure: struct student { char name[20]; int age; float marks; };
Example of union: union data { int i; floa...read more
What Is the Difference Between the Runnable and Callable Interfaces? How Are They Used?
Q14. What is your definition of work-life balance?
Work-life balance is the ability to prioritize and manage both work and personal life effectively.
It involves setting boundaries and managing time efficiently
It allows for time to pursue personal interests and hobbies
It reduces stress and burnout
Examples include flexible work hours, remote work options, and time off for personal reasons
What is static and Dynamic Binding?
What do you mean by SQL injection attack?
What is the default port of tomcat in spring boot?
1) Explain sql injection .
2) Do you know anything about DDOS attacks.
3) Explain container in microservices.
4) What do you mean by bounded context.
What is the starter dependency of the Spring boot module?
What is the purpose of using @ComponentScan in the class files?
Q21. 1. What are the commands used for maven build 2. What are the different stages we have in Jenkins pipeline. 3. Resources that are built via terraform and where we store the terraform files 4. What are the merge...
read moreAnswers to DevOps Lead interview questions
1. mvn clean install - builds the project
2. Stages in Jenkins pipeline: Build, Test, Deploy
3. Terraform builds resources like EC2 instances, S3 buckets. Terraform files are stored in version control systems like Git
4. Merge conflict tools: Git merge, Git rebase, Git cherry-pick
5. Git commands: git clone, git add, git commit, git push, git pull
When can you use super keyword?
Q24. 3 types of languages pronunciation one in english language , the same words and subject in hindi and the same statements / dialogue / description in local language that was the process of interview and also it ...
read moreThe question asked about pronunciations in English, Hindi, and the local language.
The question required knowledge of pronunciations in different languages.
Candidates were expected to provide examples of words or phrases in each language.
The question aimed to assess language proficiency and adaptability.
Q25. C code to perform in-order traversal on a binary tree.
C code for in-order traversal on a binary tree.
Start at the root node.
Traverse the left subtree recursively.
Visit the root node.
Traverse the right subtree recursively.
Repeat until all nodes have been visited.
Example code: void inorderTraversal(Node* root) { if(root != NULL) { inorderTraversal(root->left); printf("%d ", root->data); inorderTraversal(root->right); } }
Q26. What is runtime polymorphism and how do you achieve it?
Runtime polymorphism is the ability of an object to take on multiple forms during runtime.
It is achieved through inheritance and method overriding.
The method called depends on the actual object type at runtime.
Example: Animal class with a speak() method, and Dog and Cat classes that inherit from Animal and override the speak() method.
When a Dog object calls speak(), the overridden method in the Dog class is executed.
When a Cat object calls speak(), the overridden method in th...read more
Q27. Difference between Function overriding and function overloading?
Function overriding vs function overloading
Function overloading is having multiple functions with the same name but different parameters
Function overriding is having a function in a subclass with the same name and parameters as a function in the superclass
Function overloading is resolved at compile-time while function overriding is resolved at runtime
What is dependency injection?
What does the @SpringBootApplication annotation do internally?
What is meant by Data Warehousing?
What are the different types of locators in Selenium?
What is Garbage collector in JAVA?
What do you understand by Java virtual machine?
Q34. 4.When you are assigned task in beginning of the sprint what steps do you perform to take it further till completion.
To complete a task assigned at the beginning of a sprint, I follow a set of steps.
I analyze the requirements and scope of the task.
I break down the task into smaller sub-tasks and estimate the time required for each sub-task.
I prioritize the sub-tasks based on their importance and dependencies.
I create a plan and timeline for completing the sub-tasks.
I communicate with the team and stakeholders to ensure everyone is on the same page.
I start working on the sub-tasks and track ...read more
Q35. Can we change the key of dictionary. What are the criteria to select key of dictionary
Yes, the key of a dictionary in Python can be changed. The criteria for selecting a key are immutability and uniqueness.
The key of a dictionary can be any immutable data type such as strings, numbers, or tuples.
The key must be unique within the dictionary, as duplicate keys are not allowed.
Changing the value of a key is allowed, but changing the key itself requires creating a new key-value pair.
Keys that are mutable, such as lists, cannot be used as dictionary keys.
What is the difference between @RestController and @Controller in Spring Boot?
SQL Query to fetch first 5 characters of a string
What is Memory Protection in OS ?
What is dependency Injection?
Explain the difference between driver.close() and driver.quit() command in Selenium?
Q42. What is dependency injection and what are the benefits?
Dependency injection is a design pattern where objects are passed as dependencies rather than being created within a class.
Reduces coupling between classes
Increases testability and maintainability
Allows for easier swapping of dependencies
Examples: Constructor injection, Setter injection, Interface injection
What are the four necessary and sufficient conditions behind the deadlock?
What is a default method, and when does it get used?
Q45. what is capital ? what is your insurance ? alt+tab why we use ? why you use filter in excel file ?tell me about yesterday ?
The question covers various topics such as capital, insurance, alt+tab, filter in excel, and yesterday's activities.
Capital refers to the financial resources that a company or individual possesses.
Insurance is a contract between an individual or organization and an insurance company that provides financial protection against potential losses.
Alt+tab is a keyboard shortcut used to switch between open windows or applications on a computer.
Filter in excel is used to sort and dis...read more
Q46. What do you know about process management?
Process management involves planning, organizing, executing, and monitoring processes to achieve organizational goals.
It includes identifying and defining processes
Assigning responsibilities and resources
Establishing timelines and milestones
Monitoring progress and making adjustments as needed
Examples include project management, supply chain management, and quality management
Q47. Can you create a Static method inside an Abstract class or Interface?
Yes, you can create a static method inside an abstract class or interface.
Static methods can be defined in interfaces since Java 8.
Static methods in interfaces are used for providing utility methods that are not tied to any specific instance of the interface.
Static methods in abstract classes can be used for common functionality that does not require an instance of the class.
Q48. What is Indexing in SQL and why do we use Indexing?
Indexing in SQL is a way to optimize database performance by creating a data structure that allows for faster retrieval of data.
Indexing is a technique used to quickly locate and access the rows in a database table.
It works by creating an ordered list of values from one or more columns in a table.
By using indexes, the database engine can quickly find the rows that match a certain condition without having to scan the entire table.
Indexes are especially useful for tables with a...read more
What do you know about Mphasis?
Are you willing to relocate?
Q50. Familiar languages you are going through What you learn in lockdown
I am familiar with Java, Python, and JavaScript. During lockdown, I learned React and Node.js.
Familiar with Java, Python, and JavaScript
Learned React and Node.js during lockdown
Why was a new version of Java (Java 8) needed in the first place? (
1) Explain the difference between monolithic and microservices architecture.
2) Explain spring cloud.Explain CDC.
3) Main role of Docker in microservices.
What is a bootstrap program in OS?
Q54. Can you create a Static local variable inside a Static method
Yes, a static local variable can be created inside a static method.
Yes, a static local variable can be declared inside a static method in programming languages like C++.
Static local variables retain their values between function calls.
Example: static void myStaticMethod() { static int count = 0; count++; }
Q55. 3. How would you show the count in a graph 📈 which gets added multiple times ? (Method of cumulative graph - like COVID numbers)
To show count in a cumulative graph, use a line graph with time on x-axis and cumulative count on y-axis.
Use a line graph to show the cumulative count over time
Plot time on the x-axis and cumulative count on the y-axis
Add a label to the y-axis indicating the cumulative count
Use different colors or markers to differentiate between different data sets
Include a legend to explain the different colors/markers used
Describe in how many ways can you create a singleton pattern?
What are the fundamental characteristics of a Microservices Design?
What are the different strategies of Microservices Deployment?
Why is normalization needed in a database?
What is the use of Profiles in spring boot?
What are the various access specifiers in Java?
What are Java 8 streams?
Q65. What is CSAT and how it is calculated? Are you okay for 24/7 shift? How you will make customer happy?
CSAT is a customer satisfaction metric used to measure how happy customers are with a product or service.
CSAT is calculated by asking customers to rate their satisfaction on a scale of 1-5 or 1-10.
To calculate CSAT, divide the number of satisfied customers by the total number of customers surveyed and multiply by 100.
I am okay for 24/7 shift and will make customers happy by actively listening to their concerns, providing timely and accurate solutions, and going above and beyo...read more
Q66. How you will fix memory overhead issues in production?
Memory overhead issues can be fixed by optimizing code, reducing unnecessary data, and using efficient data structures.
Analyze code to identify memory leaks and optimize it
Reduce unnecessary data by removing unused variables and objects
Use efficient data structures like arrays instead of linked lists
Implement caching to reduce memory usage
Use garbage collection to free up memory
Consider using a memory profiler to identify memory usage patterns
Ensure proper memory allocation a...read more
Q67. Entity framework to join and pull details from joinee table. Left/Right join in Entity framework
Entity framework supports left/right join to pull details from joinee table.
Use LINQ to perform left/right join in Entity framework
Use DefaultIfEmpty() method to perform left join
Use join...into statement to perform right join
Example: var result = from employee in context.Employees
join department in context.Departments on employee.DepartmentId equals department.Id into empDept
from department in empDept.DefaultIfEmpty() select new { employee.Name, department.Name }
Difference between Clustered and Non-Clustered Index
Q70. Have you ever worked with nUnit framework?
Yes, I have worked with nUnit framework.
I have used nUnit for unit testing in C# projects.
I am familiar with its syntax and assertions.
I have integrated nUnit with Visual Studio for continuous testing.
I have used nUnit to test both simple and complex scenarios.
For example, I used nUnit to test a payment processing system.
I also used nUnit to test a complex algorithm for data analysis.
Q71. What is a dangling pointer?
A dangling pointer is a pointer that points to a memory location that has been deallocated or freed.
Dangling pointers can cause crashes or unexpected behavior when accessed.
They can occur when a pointer is not set to NULL after the memory it points to is freed.
Example: int *ptr = malloc(sizeof(int)); free(ptr); printf('%d', *ptr);
In the above example, ptr becomes a dangling pointer after the memory it points to is freed.
Q72. How to handle customized exceptions in controller advice with example code.
Handling customized exceptions in controller advice with example code
Create a custom exception class that extends RuntimeException
Create a controller advice class to handle exceptions globally
Use @ExceptionHandler annotation in the controller advice class to handle specific exceptions
Return a custom error response with appropriate status code and message
What is an interface?
Q74. What do you know about the Organization. For Learning which medium you should prefer Visual representation or Books?
Visual representation is preferred for learning.
Visual representation helps in better understanding complex concepts
Visual aids like diagrams, charts, and videos can enhance learning
Visual learning can improve retention and recall of information
Q75. How do you calculate the number of vowels and constant in string
This question is about calculating the number of vowels and consonants in a string.
Iterate through each character in the string
Check if the character is a vowel or a consonant
Increment the respective count variable
Return the counts of vowels and consonants
Explain SOLID principles in Object Oriented Design.
Difference between PermGen and MetaSpace
Difference between Abstract class and Interface
Explain the lifecycle methods of components.
Q80. What is inheritance and type of inheritance
Inheritance is a mechanism in OOP where a new class is derived from an existing class.
It allows the new class to inherit the properties and methods of the existing class.
The existing class is called the parent or base class, and the new class is called the child or derived class.
There are different types of inheritance: single, multiple, multilevel, and hierarchical.
Example: A car class can be a parent class, and a sedan class can be a child class that inherits the properties...read more
Q81. What is Angular component life cycle? What are the hooks provided by Angular framework?
Angular component life cycle includes various hooks provided by Angular framework for managing component initialization, change detection, and destruction.
ngOnChanges: Called when input properties of a component change
ngOnInit: Called once when the component is initialized
ngDoCheck: Called during every change detection run
ngAfterContentInit: Called after content (ng-content) has been projected into the component
ngAfterContentChecked: Called after every check of the projected ...read more
Q82. What is box model in CSS? How to create responsive websites and web applications?
The box model in CSS defines the design and layout of elements on a webpage.
The box model consists of content, padding, border, and margin.
Content is the actual content of the element, padding is the space between the content and the border, border is the border around the element, and margin is the space outside the border.
To create responsive websites and web applications, use media queries to adjust styles based on screen size, use flexible units like percentages or ems, a...read more
Q83. Tell me something about Stock Market & Insurance
Stock market & insurance are both financial instruments used for investment and risk management.
Stock market involves buying and selling of shares of publicly traded companies
Insurance is a contract between an individual and an insurance company to protect against financial loss
Both involve risk management and investment
Stock market investments can be insured through options and futures contracts
Insurance companies may invest in the stock market to generate returns for policy...read more
Q84. What is the memory allocation for a String?
String memory allocation is dynamic and depends on the length of the string.
String memory allocation is dynamic and can change based on the length of the string.
In Java, a String object is stored in the heap memory.
Each character in a String typically takes up 2 bytes of memory.
String objects in Java are immutable, meaning once a String object is created, it cannot be changed.
Q85. 2 programming questions Find the 2nd greatest in 2 different ways
Find the 2nd greatest in 2 different ways
Sort the array and return the second largest element
Use a loop to find the largest element and then find the second largest element
Use a priority queue to find the second largest element
Q86. what is ram and rom, what is control panel, shortcuts to open different different things
RAM and ROM are types of computer memory. Control Panel is a settings menu. Shortcuts are quick ways to open programs.
RAM stands for Random Access Memory and is used for temporary storage of data that the computer is currently using.
ROM stands for Read-Only Memory and is used for permanent storage of data that cannot be changed.
Control Panel is a settings menu in Windows that allows users to change various system settings such as display, sound, and network settings.
Shortcuts...read more
Q87. What are the endpoints in WebAPI
Endpoints are URLs that clients use to access resources in a WebAPI.
Endpoints are the entry points for a WebAPI.
They define the resources that can be accessed by clients.
Endpoints are identified by a URL and HTTP method.
Examples of endpoints include /api/users and /api/products.
Endpoints can have parameters that are passed in the URL or request body.
Q88. What's formula used for condition based scenarios in excel? (IF, SUMIF etc)
Excel uses IF, SUMIF, COUNTIF, AVERAGEIF, and other formulas for condition based scenarios.
IF formula checks if a condition is met and returns one value if true and another if false.
SUMIF formula adds up values in a range that meet a certain condition.
COUNTIF formula counts the number of cells in a range that meet a certain condition.
AVERAGEIF formula calculates the average of values in a range that meet a certain condition.
Other formulas like MAXIF, MINIF, and CONCATENATEIF ...read more
Q89. If we have partitions in Databases why we need partition in informatica also??
Partitions in Informatica help in parallel processing and improving performance.
Partitions in databases and Informatica serve different purposes
Informatica partitions help in parallel processing of data
Improves performance by distributing data processing across multiple nodes
Allows for better resource utilization and faster data processing
Example: Partitioning in Informatica can be used to process large volumes of data efficiently
Q90. How to handle the exceptions globally in rest api Springboot
Handle exceptions globally in Springboot REST API
Use @ControllerAdvice annotation to define global exception handling for all controllers
Create a class annotated with @ControllerAdvice and define methods to handle specific exceptions
Use @ExceptionHandler annotation to specify which exceptions the method should handle
Return appropriate HTTP status codes and error messages in the exception handling methods
Q91. What annotations are included in @SpringbootApplication annotation
The @SpringBootApplication annotation includes @Configuration, @EnableAutoConfiguration, and @ComponentScan annotations.
Includes @Configuration annotation to specify that the class can be used by the Spring IoC container as a source of bean definitions.
Includes @EnableAutoConfiguration annotation to enable Spring Boot's auto-configuration feature.
Includes @ComponentScan annotation to specify the base packages to scan for components.
Q92. What is Change management and overall workflow of change?
Change management is the process of planning, implementing, and monitoring changes to improve business processes.
Identify the need for change
Plan and design the change
Implement the change
Monitor and evaluate the change
Communicate the change to stakeholders
Ensure proper training and support for the change
Continuously improve the change process
Difference between Bridge Pattern and Adapter Button
Q95. When a transaction is in process and the power is down, what would be the transaction would have been in the user account?
The transaction would not have been completed and the user account would not have been updated.
Transaction would be in an incomplete state
User account would not reflect the transaction
Data integrity may be compromised
Q96. Various patterns to achieve DI (Method, Constructor, Property level)
DI can be achieved through method, constructor, and property level patterns.
Method level DI involves passing dependencies as method parameters.
Constructor level DI involves passing dependencies as constructor parameters.
Property level DI involves setting dependencies as properties of an object.
Examples of DI frameworks that use these patterns include Spring and Unity.
Choosing the appropriate pattern depends on the specific use case and design considerations.
Q97. what is the difference between class not exception and no definition class
A class not exception refers to a class that does not inherit from the Exception class, while a no definition class refers to a class that has not been defined or declared.
A class not exception does not have the built-in exception handling capabilities provided by the Exception class.
A no definition class means that the class has not been defined or declared in the code.
An example of a class not exception could be a custom class created for data manipulation, which does not n...read more
Q98. 1.Difference between findElement and findElements. 2. What is interface?
Explaining the difference between findElement and findElements and defining interface.
findElement returns the first matching element on the page while findElements returns a list of all matching elements.
Both methods are used to locate web elements on a page using locators such as ID, class name, name, etc.
An interface is a collection of abstract methods that can be implemented by a class. It defines a contract that the implementing class must follow.
In Java, interfaces are u...read more
Q99. Find names starting with "A" and department 2 from a list and add values into another list using java 8.
Using Java 8, filter names starting with 'A' and in department 2 and add them to a new list.
Use Java 8 stream to filter names starting with 'A' and in department 2
Collect the filtered names into a new list
Q100. What is the Data Structure ?
Data structure is a way of organizing and storing data in a computer so that it can be accessed and modified efficiently.
Data structures define the way data is organized and stored in memory.
Examples include arrays, linked lists, stacks, queues, trees, and graphs.
Choosing the right data structure is crucial for efficient algorithm design and performance.
Top HR Questions asked in null
Interview Process at null
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month