i
Cognizant
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by
I applied via Recruitment Consultant and was interviewed in Oct 2021. There were 4 interview rounds.
Controller Advice is a mechanism in Spring MVC to handle exceptions globally.
It is used to handle exceptions across multiple controllers.
It can be used to add common data to the model.
It can be used to customize the response status code and message.
It can be used to redirect to a custom error page.
2 way SSL is needed for mutual authentication between client and server.
2 way SSL ensures that both client and server are authenticated
It provides an extra layer of security by verifying the identity of both parties
It is commonly used in financial transactions, healthcare, and government applications
Decorator pattern adds behavior to an object dynamically without affecting its existing behavior.
It is a structural pattern
It involves a component interface, concrete component, decorator interface, and concrete decorator
Decorators wrap around components to add new behavior
It allows for flexible and dynamic behavior modification
Example: Java I/O streams use decorator pattern
Grouping by in streams in Java
Use the 'groupingBy' method from the 'Collectors' class
Pass a lambda expression to specify the grouping criteria
The result is a Map with the grouping criteria as keys and the grouped elements as values
I applied via Approached by Company and was interviewed in Aug 2024. There were 2 interview rounds.
Find 2nd max element in an array of strings.
Sort the array in descending order
Return the element at index 1
Sort strings based on city names.
Use Arrays.sort() method with a custom Comparator to sort strings based on city names.
Create a Comparator that compares the city names of two strings.
Example: String[] cities = {"New York", "London", "Paris"};
Example: Arrays.sort(cities, (a, b) -> a.compareTo(b));
I addressed team conflicts by promoting open communication, active listening, and facilitating constructive discussions.
Encouraged team members to express their concerns and viewpoints openly
Acted as a mediator to resolve conflicts and find common ground
Implemented team-building activities to improve collaboration and trust
Provided constructive feedback and guidance to help team members work through conflicts
I was interviewed in Dec 2024.
RestAPI implementation involves creating web services using HTTP methods to interact with data.
Use HTTP methods like GET, POST, PUT, DELETE to perform CRUD operations on resources
Implement endpoints with appropriate request and response formats (JSON, XML)
Secure API with authentication and authorization mechanisms like OAuth
Document API using tools like Swagger for easy consumption by clients
I applied via Referral and was interviewed in Mar 2024. There was 1 interview round.
Using static in main function allows it to be called without creating an instance of the class.
Static in main function allows it to be called directly without creating an object of the class.
Static methods can be called using the class name itself, without creating an object.
Example: public static void main(String[] args) { }
posted on 25 Mar 2024
I applied via Naukri.com and was interviewed before Mar 2023. There were 3 interview rounds.
Data Structures, logical questions
I was interviewed in Jan 2025.
A sequence was provided: 4181, 2684, 1597, 987, 610.
first 2 are given and write code for other value calculation using java 8
The second question required writing a reverse of a palindrome using both Java 8 streams. I was able to successfully write both and clear the first round.
Java 17 introduces sealed classes to restrict inheritance and improve code maintainability.
Sealed classes are declared using the 'sealed' keyword followed by the permitted subclasses.
Subclasses of a sealed class must be either final or sealed themselves.
Errors may occur when trying to extend a sealed class with a non-permitted subclass.
Implementation of 'notify me if item is back in stock' feature in an ecommerce application
Create a database table to store user notifications for out-of-stock items
Implement a service to check item availability and send notifications to subscribed users
Provide a user interface for users to subscribe to notifications for specific items
I applied via Recruitment Consulltant and was interviewed in Nov 2024. There were 2 interview rounds.
The first round was an interview conducted with a GENAI virtual bot.
Spring Boot uses autoconfiguration to automatically configure the Spring application based on dependencies and properties.
Spring Boot autoconfiguration is achieved through @EnableAutoConfiguration annotation
Autoconfiguration classes are located in the org.springframework.boot.autoconfigure package
Autoconfiguration classes are conditionally applied based on the presence of specific classes or properties
I applied via Naukri.com and was interviewed in Nov 2024. There was 1 interview round.
HashMap is non-synchronized and allows null values, while HashTable is synchronized and does not allow null values.
HashMap is non-synchronized, meaning it is not thread-safe, while HashTable is synchronized and thread-safe.
HashMap allows null values for both keys and values, while HashTable does not allow null keys or values.
HashMap is generally preferred for non-thread-safe applications, while HashTable is used in mul
I applied via Naukri.com and was interviewed in Aug 2024. There was 1 interview round.
Transactions in Spring Boot manage database operations as a single unit of work to ensure data integrity.
Spring Boot provides support for declarative transaction management using @Transactional annotation.
Transactions can be configured at class or method level.
Transactions can be rolled back in case of exceptions to maintain data consistency.
Example: @Transactional annotation on a service method ensures that all databa...
ArrayList is resizable array implementation, LinkedList is doubly linked list implementation.
ArrayList uses dynamic array to store elements, LinkedList uses doubly linked list.
ArrayList is faster for accessing elements by index, LinkedList is faster for adding/removing elements.
Example: ArrayList
REST API is used to communicate between client and server using HTTP methods like GET, POST, PUT, DELETE.
REST API allows clients to access and manipulate resources on a server using standard HTTP methods.
It uses URLs to identify resources and HTTP methods to perform actions on those resources.
Common HTTP methods used in REST API are GET (retrieve data), POST (create data), PUT (update data), DELETE (remove data).
REST A...
Annotations in Spring Boot are used to provide metadata about the application and its components.
Annotations are used to configure Spring Boot applications, define beans, handle requests, etc.
Examples include @SpringBootApplication, @RestController, @Autowired, @RequestMapping, etc.
Java 8 introduced several new features including lambda expressions, functional interfaces, streams, and default methods in interfaces.
Lambda expressions allow for more concise code and enable functional programming.
Functional interfaces are interfaces with a single abstract method, used for lambda expressions.
Streams provide a way to work with collections of objects in a functional style.
Default methods in interfaces ...
Interfaces in Java are implemented using the 'implements' keyword, allowing classes to provide specific implementations for methods defined in the interface.
Interfaces in Java define a contract for classes to implement, specifying method signatures without implementations.
A class can implement multiple interfaces by separating them with commas.
Classes implementing an interface must provide concrete implementations for ...
Stream API in Java provides a way to process collections of objects in a functional style.
Stream API allows for functional-style operations on collections like map, filter, reduce, etc.
It supports lazy evaluation, meaning operations are only performed when needed.
Streams can be sequential or parallel, depending on the source and operations used.
Spring Boot simplifies the setup and development of Spring applications by providing a convention-over-configuration approach.
Spring Boot eliminates the need for XML configuration by using annotations and sensible defaults.
It includes embedded servers like Tomcat, Jetty, or Undertow, making it easy to deploy standalone applications.
Auto-configuration feature reduces the amount of boilerplate code needed to set up a Spr...
throw is a keyword used to explicitly throw an exception, while Throwable is a class that serves as the base class for all exceptions in Java.
throw is used to throw an exception in a method, while Throwable is the superclass of all exceptions in Java.
throw is followed by an instance of Throwable class or its subclasses, while Throwable is a class that provides common methods for handling exceptions.
Example: throw new N...
based on 2 reviews
Rating in categories
Associate
72.2k
salaries
| ₹5.1 L/yr - ₹16 L/yr |
Programmer Analyst
55.5k
salaries
| ₹2.4 L/yr - ₹9.6 L/yr |
Senior Associate
48.5k
salaries
| ₹8.9 L/yr - ₹27.3 L/yr |
Senior Processing Executive
28.9k
salaries
| ₹1.8 L/yr - ₹9 L/yr |
Technical Lead
17.6k
salaries
| ₹5.9 L/yr - ₹24.2 L/yr |
TCS
Infosys
Wipro
Accenture