i
Cognizant
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by
I applied via Campus Placement and was interviewed before Sep 2023. There were 2 interview rounds.
Easy to moderate level questions based on arrays , matrix and strings
Runtime polymorphism occurs when a method is overridden in a subclass, while compile time polymorphism occurs when method overloading is used.
Runtime polymorphism is achieved through method overriding, where a subclass provides a specific implementation of a method that is already provided by its parent class.
Compile time polymorphism is achieved through method overloading, where multiple methods with the same name but...
Print each letter in a string along with the number of times it occurs
Iterate through the string and count the occurrences of each letter
Use a HashMap to store the letter as key and count as value
Print the letter and count for each unique letter
I applied via Job Portal and was interviewed before Sep 2023. There were 2 interview rounds.
Collection, stream api
Data can be retrieved from a database in Spring Boot using JPA repositories or JDBC templates.
Use JPA repositories to create custom queries and retrieve data from the database.
Use JDBC templates to execute SQL queries and retrieve data from the database.
Configure the data source in the application.properties file.
Use annotations like @Repository, @Entity, @Table, etc. to map Java objects to database tables.
What people are saying about Cognizant
Cognizant interview questions for designations
I applied via campus placement at G Pulla Reddy Engineering College, Kurnool and was interviewed before Aug 2022. There were 4 interview rounds.
Simple aptitude test
Coding questions based on data structures
Get interview-ready with Top Cognizant Interview Questions
I applied via Job Portal and was interviewed in Sep 2021. There were 2 interview rounds.
HashMap is a data structure that stores key-value pairs and uses hashing to retrieve values.
HashMap uses an array of buckets to store key-value pairs
Each bucket contains a linked list of entries
Hashing is used to determine the index of the bucket where the entry should be stored
If multiple entries have the same hash code, they are stored in the same bucket as a linked list
HashMap allows null keys and values
HashMap is n...
Immutable classes cannot be modified after creation. They ensure thread safety and prevent bugs.
Make the class final so it cannot be extended
Make all fields private and final
Do not provide any setters, only getters
If a field is mutable, return a copy of it in the getter
Consider using a builder pattern for complex objects
Singleton class is a class that can only have one instance at a time.
Create a private constructor to prevent instantiation from outside the class.
Create a private static instance of the class.
Create a public static method to get the instance of the class.
Ensure thread safety by using synchronized keyword or static initializer.
Example: public class Singleton { private static Singleton instance = null; private Singleton(...
List allows duplicates and maintains insertion order, Set doesn't allow duplicates and doesn't maintain order.
Use List when duplicates are allowed and order is important
Use Set when duplicates are not allowed and order is not important
List examples: ArrayList, LinkedList
Set examples: HashSet, TreeSet
Implementing Spring security with JWT token involves configuring security filters and authentication providers.
Add dependencies for Spring Security and JWT
Configure security filters to validate JWT tokens
Implement authentication provider to authenticate users
Generate and sign JWT tokens for successful authentication
Example: https://www.baeldung.com/spring-security-jwt
I applied via Naukri.com
To sort an array list, use the Collections.sort() method.
Import the java.util.Collections class
Call the sort() method and pass the array list as parameter
Ensure the objects in the array list implement the Comparable interface or pass a Comparator object as second parameter
I applied via Company Website and was interviewed in Jan 2022. There was 1 interview round.
I applied via Campus Placement and was interviewed in May 2021. There were 3 interview rounds.
Interview questions for Java Developer
JVM is a virtual machine that executes Java bytecode
OOPS is a programming paradigm based on objects and classes
SQL queries are used to retrieve data from a database
REST API is a web service that uses HTTP requests to access and manipulate data
Sorting an ArrayList can be done using Collections.sort() method
Known sorting algorithms include Bubble Sort, Quick Sort, and Merge Sort
Some of the top questions asked at the Cognizant Java Developer interview -
The duration of Cognizant Java Developer interview process can vary, but typically it takes about less than 2 weeks to complete.
based on 24 interviews
3 Interview rounds
based on 142 reviews
Rating in categories
Hyderabad / Secunderabad,
Chennai
+15-10 Yrs
Not Disclosed
Associate
72.3k
salaries
| ₹5.1 L/yr - ₹16 L/yr |
Programmer Analyst
55.6k
salaries
| ₹2.4 L/yr - ₹9.6 L/yr |
Senior Associate
48.6k
salaries
| ₹9 L/yr - ₹27.4 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.9 L/yr |
TCS
Infosys
Wipro
Accenture