i
Cognizant
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by
I applied via Walk-in and was interviewed before Mar 2022. There were 4 interview rounds.
Held by third party companies
String is immutable because it cannot be changed once created.
Immutable objects are safer to use in multi-threaded environments
String pool in Java is possible because of immutability
StringBuffer and StringBuilder classes are used for mutable strings
HashMap is a key-value pair collection while HashSet is a set of unique elements.
HashMap allows duplicate values but not duplicate keys
HashSet does not allow duplicate elements
HashMap uses key to retrieve values while HashSet uses contains() method to check if an element exists
Example: HashMap - {1=apple, 2=banana, 3=apple}, HashSet - {apple, banana}
HashMap implements Map interface while HashSet implements Set interfac
Functional Interface has only one abstract method while Normal Interface can have multiple abstract methods.
Functional Interface is used for lambda expressions and method references.
Normal Interface can have default and static methods along with abstract methods.
Example of Functional Interface: java.util.function.Predicate
Example of Normal Interface: java.util.List
StringBuffer is synchronized while StringBuilder is not.
StringBuffer is thread-safe while StringBuilder is not.
StringBuffer is slower than StringBuilder due to synchronization.
StringBuilder is preferred for single-threaded environments.
Both classes are used for manipulating strings.
Example: StringBuffer sb = new StringBuffer("Hello");
Example: StringBuilder sb = new StringBuilder("Hello");
Design patterns are reusable solutions to common software design problems.
Design patterns provide a common language for developers to communicate about solutions to common problems.
They can improve the quality, maintainability, and scalability of software.
Examples of design patterns include the Singleton pattern, Factory pattern, and Observer pattern.
Creating threads in programming and the different ways to do so.
Threads can be created by extending the Thread class and overriding the run() method.
Threads can also be created by implementing the Runnable interface and passing it to a Thread object.
Java 8 introduced the concept of creating threads using lambda expressions.
Thread pools can be used to manage a group of threads.
Examples: Thread t1 = new Thread(); t1.star...
I applied via Naukri.com and was interviewed in Jul 2021. There were 4 interview rounds.
What people are saying about Cognizant
Cognizant interview questions for designations
I was interviewed in Sep 2021.
Simple program questions
Get interview-ready with Top Cognizant Interview Questions
I applied via Naukri.com and was interviewed before Aug 2021. There was 1 interview round.
I applied via Job Portal and was interviewed before May 2022. There were 3 interview rounds.
I applied via Recruitment Consultant and was interviewed in Feb 2021. There was 1 interview round.
The choice between 'call' and 'apply' in JavaScript depends on whether you have the arguments as an array or as individual parameters.
Use 'call' when you have the arguments as individual parameters.
Use 'apply' when you have the arguments as an array.
Both 'call' and 'apply' allow you to invoke a function with a specific 'this' value.
IIFE (Immediately Invoked Function Expression) is used to create a private scope and avoid global namespace pollution.
IIFE can be used to create modules in JavaScript.
It can also be used to avoid naming conflicts in code.
IIFE can be used to create closures and maintain state.
It can be used to execute code immediately without the need for a function call.
IIFE can be used to pass arguments to a function without exposing
Temporal dead zone is a behavior in JavaScript where a variable cannot be accessed before it is declared.
Variables declared with let and const are hoisted but cannot be accessed before their declaration.
This behavior helps in avoiding errors due to accessing variables before they are initialized.
Example: console.log(x); // ReferenceError: x is not defined let x = 10;
Temporal dead zone only applies to block-scoped var
Internal values of const objects can be updated in JavaScript due to the nature of const keyword.
The const keyword only prevents reassignment of the variable identifier, not the object itself.
Internal values of objects can be modified without reassigning the object.
This behavior is different from other programming languages where const objects are completely immutable.
Traversing a tree involves visiting each node in a specific order.
Choose a traversal method based on the problem requirements
Depth-first search (DFS) and breadth-first search (BFS) are common methods
DFS can be implemented using recursion or a stack
BFS can be implemented using a queue
Examples: inorder, preorder, postorder, level-order
Consider the time and space complexity of each method
I applied via Company Website and was interviewed in Aug 2021. There were 3 interview rounds.
The duration of Cognizant Associate interview process can vary, but typically it takes about less than 2 weeks to complete.
based on 138 interviews in last 1 year
3 Interview rounds
based on 5.2k reviews
Rating in categories
Associate
72.4k
salaries
| ₹5.1 L/yr - ₹16 L/yr |
Programmer Analyst
55.3k
salaries
| ₹2.4 L/yr - ₹9.6 L/yr |
Senior Associate
48.2k
salaries
| ₹8.9 L/yr - ₹27 L/yr |
Senior Processing Executive
28.5k
salaries
| ₹1.8 L/yr - ₹9 L/yr |
Technical Lead
17.5k
salaries
| ₹5.9 L/yr - ₹24 L/yr |
TCS
Infosys
Wipro
Accenture