i
Capgemini
Filter interviews by
I applied via Approached by Company and was interviewed in Dec 2024. There was 1 interview round.
Java 8 introduced static and default methods in interfaces, allowing for method implementation and code reusability.
Java 8 introduced static methods in interfaces, allowing for method implementation directly in the interface itself.
Default methods were also introduced in Java 8, enabling interfaces to have method implementations without affecting implementing classes.
Static methods in interfaces can be called using the...
HashMap is a data structure that stores key-value pairs and uses hashing to efficiently retrieve values.
HashMap uses an array of linked lists to store key-value pairs.
When a key-value pair is added, the key is hashed to determine the index in the array where it will be stored.
If multiple keys hash to the same index, a linked list is used to handle collisions.
To synchronize a HashMap, you can use the synchronizedMap() m...
No, the program will not compile if the parent class throws a runtime exception while the child class throws an arithmetic exception.
In Java, if a parent class method throws a checked exception, the child class method can only throw the same exception or its subclasses.
ArithmeticException is an unchecked exception, so if the parent class throws a checked exception and the child class throws an unchecked exception, the ...
Configure JDBC in Spring Boot to specify which database to use
Define multiple DataSource beans in the configuration class
Use @Primary annotation to specify the primary DataSource
Use @Qualifier annotation to specify the secondary DataSource
Inject the DataSource beans where needed in the application
To use a Jetty server in a Spring Boot application, you can configure it as a dependency and customize its settings.
Add Jetty server dependency in your pom.xml file
Exclude Tomcat server dependency if it's included by default in Spring Boot
Configure Jetty server settings in application.properties or application.yml file
Example: Add Jetty dependency - <dependency> <groupId>org.springframework.boot</groupId...
RequestParam is used to extract query parameters from the URL, while PathVariable is used to extract values from the URI path.
RequestParam is used for query parameters in the URL, while PathVariable is used for values in the URI path.
RequestParam is optional, while PathVariable is required.
RequestParam is used with the @RequestParam annotation, while PathVariable is used with the @PathVariable annotation.
Example: @Requ...
I would implement timeout mechanisms and retries to handle the scenario of one microservice awaiting a response from another microservice taking an extended time.
Implement timeout mechanisms in the calling microservice to limit the waiting time for a response.
Set up retry logic to automatically resend the request to the slow microservice if no response is received within the specified timeout period.
Use circuit breaker...
I applied via Naukri.com and was interviewed in Dec 2024. There was 1 interview round.
SOLID principles in Java focus on object-oriented design principles. Java 8 features like lambdas and streams adhere to these principles.
S - Single Responsibility Principle: Java 8 lambdas allow for defining single-purpose functions.
O - Open/Closed Principle: Java 8 streams enable extending behavior without modifying existing code.
L - Liskov Substitution Principle: Java 8 interfaces support polymorphism and substitutio...
A Singleton class in Java ensures that only one instance of the class is created and provides a global point of access to it.
Use a private static instance variable to hold the single instance of the class.
Make the constructor private to prevent instantiation from outside the class.
Provide a public static method to access the single instance, creating it if necessary.
A controller is a component in the Model-View-Controller (MVC) design pattern that handles user input and updates the model and view accordingly.
Controls the flow of the application
Interacts with the model to update data
Receives input from the user and processes it
Updates the view based on changes in the model
Examples: Spring MVC Controller, JavaFX Controller
Code to print unique elements from an array of strings
Create a HashSet to store unique elements
Iterate through the array and add elements to the HashSet
Print out the elements in the HashSet to get unique elements
Code to find the second largest element in an array
Iterate through the array and keep track of the largest and second largest elements
Initialize variables to store the largest and second largest elements
Compare each element with the largest and second largest elements and update accordingly
Hash collision occurs when two different inputs produce the same hash value. hashCode() and equals() methods are from Object class.
Hash collision can occur when two different objects have the same hash code value.
hashCode() method is used to get the hash code value of an object.
equals() method is used to compare two objects for equality.
Circuit breaker is a design pattern used to prevent cascading failures in distributed systems.
Circuit breaker monitors for failures and trips when a threshold is reached
It then redirects calls to a fallback mechanism to prevent further failures
Once the system stabilizes, the circuit breaker can be reset to allow normal operation
ControllerAdvice in Spring Boot is used for global exception handling in RESTful APIs.
Create a class annotated with @ControllerAdvice
Use @ExceptionHandler to define methods to handle specific exceptions
Use @RestControllerAdvice for returning JSON responses
What people are saying about Capgemini
I was interviewed in Dec 2024.
Capgemini interview questions for popular designations
I was interviewed in Dec 2024.
Get interview-ready with Top Capgemini Interview Questions
I was interviewed in Jan 2025.
I applied via Naukri.com and was interviewed in Nov 2024. There were 2 interview rounds.
I was interviewed in Jan 2025.
First, you must clear the aptitude test.
Coding will involve understanding the basics.
I applied via Naukri.com and was interviewed in Oct 2024. There were 3 interview rounds.
To predict output for an interface program in C#
Understand the input parameters and expected output of the interface program
Analyze the logic and algorithms used in the program
Consider edge cases and potential errors in the program
Use debugging tools and test cases to validate the output prediction
C# program to reverse a string of text
Use the ToCharArray method to convert the string to a char array
Use a for loop to iterate through the array and reverse the characters
Use the String constructor to create a new string from the reversed char array
Using LINQ to manipulate string arrays in C#
Use LINQ methods like Where, Select, OrderBy, etc. to filter, transform, or sort string arrays
Example: string[] names = {"Alice", "Bob", "Charlie"}; var result = names.Where(name => name.Length > 4);
Example: string[] fruits = {"apple", "banana", "cherry"}; var sortedFruits = fruits.OrderBy(fruit => fruit);
Some of the top questions asked at the Capgemini interview -
The duration of Capgemini interview process can vary, but typically it takes about less than 2 weeks to complete.
based on 3.7k interviews
Interview experience
based on 41.4k reviews
Rating in categories
Consultant
55.1k
salaries
| ₹5.2 L/yr - ₹17.5 L/yr |
Associate Consultant
50.8k
salaries
| ₹3 L/yr - ₹11.8 L/yr |
Senior Consultant
46k
salaries
| ₹7.4 L/yr - ₹24.5 L/yr |
Senior Analyst
20.8k
salaries
| ₹2 L/yr - ₹7.5 L/yr |
Senior Software Engineer
20.1k
salaries
| ₹3.5 L/yr - ₹12.4 L/yr |
Wipro
Accenture
Cognizant
TCS