Capgemini
10+ Emcure Pharmaceuticals Interview Questions and Answers
Q1. What is call, apply and bind in JavaScript?
Call, apply and bind are methods used to manipulate the 'this' keyword in JavaScript functions.
Call and apply are used to invoke a function with a specific 'this' context and arguments.
Call takes arguments as comma-separated values, while apply takes arguments as an array.
Bind returns a new function with a specific 'this' context, which can be called later with arguments.
Bind is useful for creating a new function with a fixed 'this' context, such as event handlers.
Q2. Code a React app to change name state on a click of a button on code sandbox.
Code a React app to change name state on a click of a button on code sandbox.
Create a functional component with a state for name
Render a button with an onClick event to update the name state
Display the name state in the component
Use CodeSandbox to test the app
Q3. what happens when same key value is entered in HAshmap
When the same key value is entered in a HashMap, the new value will overwrite the existing value associated with that key.
When a duplicate key is added, the new value will replace the old value for that key
HashMap does not allow duplicate keys, so each key must be unique
Retrieving the value for a key will return the most recently added value
Q4. Write Java 8 streams API code to test if string is a palindrome
Using Java 8 streams API to check if a string is a palindrome
Use stream to convert the string to a character array
Reverse the character array using stream
Compare the reversed array with the original array to check for palindrome
Q5. What is promise in JavaScript?
Promise is an object representing the eventual completion or failure of an asynchronous operation.
Promises are used to handle asynchronous operations in JavaScript
A promise has three states: pending, fulfilled, or rejected
Promises can be chained using .then() and .catch() methods
Promises can be created using the Promise constructor or the shorthand syntax
Q6. sql performance optimication how to deal
SQL performance optimization involves indexing, query optimization, and database design improvements.
Use indexes on frequently queried columns to speed up search operations.
Optimize queries by avoiding unnecessary joins, using appropriate data types, and limiting the number of rows returned.
Consider denormalizing the database schema for better performance in read-heavy applications.
Regularly monitor and analyze query performance using tools like EXPLAIN in MySQL or Query Stor...read more
Q7. al tools can be used in net how
Various tools like Visual Studio, ReSharper, Git, and Jira can be used in .NET development.
Visual Studio is a popular IDE for .NET development
ReSharper is a code analysis tool that can be used with Visual Studio
Git is a version control system commonly used in .NET projects
Jira is a project management tool that can be integrated with .NET development workflows
Q8. What is @Controller and @RestController
The @Controller and @RestController annotations are used in Spring MVC to define classes as controllers for handling web requests.
The @Controller annotation is used to define a class as a controller in Spring MVC, which can handle web requests and return a view.
The @RestController annotation is used to define a class as a RESTful controller in Spring MVC, which can handle web requests and return data in JSON or XML format.
The @RestController annotation is a combination of @Co...read more
Q9. Difference between @pathvariable and @requestParam
PathVariable is used to extract values from the URI while RequestParam is used to extract values from query parameters.
PathVariable is used to bind a method parameter to a URI template variable in a Spring MVC application.
RequestParam is used to extract query parameters from the URL in a Spring MVC application.
PathVariable is part of the URI while RequestParam is part of the query parameters.
PathVariable is used for mandatory parameters while RequestParam is used for optional...read more
Q10. Build a react todo app.
A React todo app with CRUD functionality.
Use React hooks to manage state.
Create a form to add new todos.
Display todos in a list and allow for editing and deletion.
Use local storage to persist data.
Style with CSS or a UI library like Material UI.
Q11. 1. What is @ComponentScan
Annotation used in Spring framework to enable component scanning for Spring-managed beans.
Used to automatically detect and register Spring-managed beans within the specified package(s)
Can be used at class level or configuration classes to specify base package(s) to scan
Can be customized with additional attributes like basePackageClasses, includeFilters, excludeFilters
Example: @ComponentScan(basePackages = {"com.example.package1", "com.example.package2"})
More about working at Capgemini
Interview Process at Emcure Pharmaceuticals
Top Senior Software Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month