Upload Button Icon Add office photos
Engaged Employer

i

This company page is being actively managed by Cognizant Team. If you also belong to the team, you can get access from here

Cognizant Verified Tick

Compare button icon Compare button icon Compare

Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards

zig zag pattern zig zag pattern

Filter interviews by

Cognizant Java Developer Interview Questions, Process, and Tips

Updated 20 Dec 2024

Top Cognizant Java Developer Interview Questions and Answers

  • Q1. What array list and linkedlist difference,how hashmap internally working,what is synchronised and it's type,what is difference between abstract and interface,class loadin ...read more
  • Q2. write program fibonacci series, write program using boolean, write class cast exceptn, singleton design pattern(like you have to jvm one have jdk 1.7 and other have jdk 1 ...read more
  • Q3. Difference between List and Set? which one to prefer in which requirements and why ?
View all 21 questions

Cognizant Java Developer Interview Experiences

24 interviews found

Interview experience
4
Good
Difficulty level
Easy
Process Duration
2-4 weeks
Result
Selected Selected

I applied via Campus Placement and was interviewed before Sep 2023. There were 2 interview rounds.

Round 1 - Coding Test 

Easy to moderate level questions based on arrays , matrix and strings

Round 2 - One-on-one 

(2 Questions)

  • Q1. Explain runtime polymorphism and compile time polymorphism
  • Ans. 

    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...

  • Answered by AI
  • Q2. Given a string , print the letter and the number of times it occurs
  • Ans. 

    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

  • Answered by AI
Interview experience
5
Excellent
Difficulty level
Moderate
Process Duration
2-4 weeks
Result
Selected Selected

I applied via Job Portal and was interviewed before Sep 2023. There were 2 interview rounds.

Round 1 - Coding Test 

Collection, stream api

Round 2 - HR 

(1 Question)

  • Q1. How do you get data from database in spring boot?
  • Ans. 

    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.

  • Answered by AI

Skills evaluated in this interview

Java Developer Interview Questions Asked at Other Companies

asked in Deloitte
Q1. Sort 0 and 1 Problem Statement Given an integer array ARR of size ... read more
Q2. Parent class has run() and walk() . Parent run() - calls walk() C ... read more
asked in Infosys
Q3. Which should be preferred between String and StringBuffer when th ... read more
asked in Deloitte
Q4. Convert BST to Greater Sum Tree Given a Binary Search Tree (BST) ... read more
Q5. 2. What will happen if hashcode only returns a constant? How will ... read more
Round 1 - Technical 

(1 Question)

  • Q1. Core java , jdbc template, basic rest questions...restcontroller vs controller, springbootappliaction annotation,multithreading.
Round 2 - HR 

(1 Question)

  • Q1. Asks about current salary..gets shocked with current CTC. I tell her my expectations, she says you better go with current offers in hand. Why do I had to go through all interview process if you could not p...

Interview Preparation Tips

Interview preparation tips for other job seekers - Do basic core java,spring,rest questions. Don't interview here...there is no professionalism here while discussing salary.
Round 1 - Resume Shortlist 
Pro Tip by AmbitionBox:
Keep your resume crisp and to the point. A recruiter looks at your resume for an average of 6 seconds, make sure to leave the best impression.
View all tips
Round 2 - Technical 

(1 Question)

  • Q1. Basic oops concepts, basic sql queries, some questions on spring framework.
Round 3 - HR 

(1 Question)

  • Q1. Basic hr questions were asked like strengths, weakness, what you have learned in your college life, how have you changed as a person during your college life etc

Interview Preparation Tips

Interview preparation tips for other job seekers - prepare for basic oops, resume, and hr questions.

Cognizant interview questions for designations

 Senior Java Developer

 (5)

 Junior Java Developer

 (1)

 Core Java Developer

 (1)

 Fullstack Java Developer

 (2)

 Java Full Stack Developer

 (4)

 Java Spring Boot Developer

 (1)

 Java Technical Lead

 (1)

 Software Engineer and Java Developer

 (1)

Java Developer Interview Questions & Answers

user image Parameswar Reddy

posted on 18 Aug 2023

Interview experience
4
Good
Difficulty level
Hard
Process Duration
Less than 2 weeks
Result
Selected Selected

I applied via campus placement at G Pulla Reddy Engineering College, Kurnool and was interviewed before Aug 2022. There were 4 interview rounds.

Round 1 - Resume Shortlist 
Pro Tip by AmbitionBox:
Don’t add your photo or details such as gender, age, and address in your resume. These details do not add any value.
View all tips
Round 2 - Aptitude Test 

Simple aptitude test

Round 3 - Coding Test 

Coding questions based on data structures

Round 4 - One-on-one 

(3 Questions)

  • Q1. Two coding questions based on algorithms
  • Q2. Palindrome substrings, it is a dynamic problem
  • Q3. Permutations, it is a Backtracking problem

Interview Preparation Tips

Topics to prepare for Cognizant Java Developer interview:
  • Data Structures
  • Algorithms

Get interview-ready with Top Cognizant Interview Questions

I applied via Job Portal and was interviewed in Sep 2021. There were 2 interview rounds.

Round 1 - Resume Shortlist 
Pro Tip by AmbitionBox:
Properly align and format text in your resume. A recruiter will have to spend more time reading poorly aligned text, leading to high chances of rejection.
View all tips
Round 2 - Technical 

(8 Questions)

  • Q1. Internal working of hashmap?
  • Ans. 

    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...

  • Answered by AI
  • Q2. How to create immutable classes?
  • Ans. 

    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

  • Answered by AI
  • Q3. How to create singleton class ?
  • Ans. 

    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(...

  • Answered by AI
  • Q4. We have a employee class having empId, name and salary fields. I have around 1000 employee objects, I want to sort them according employee name is descending order?
  • Q5. Basic OOPS related questions?
  • Q6. Difference between List and Set? which one to prefer in which requirements and why ?
  • Ans. 

    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

  • Answered by AI
  • Q7. Spring Boot basic questions?
  • Q8. How to implement Spring security with JWT token?
  • Ans. 

    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

  • Answered by AI

Interview Preparation Tips

Interview preparation tips for other job seekers - Do refresh all your basics specially in core java

Skills evaluated in this interview

Java Developer Jobs at Cognizant

View all
Round 1 - Technical 

(1 Question)

  • Q1. Current project, spring related questions

Interview Preparation Tips

Interview preparation tips for other job seekers - Prepare spring boot, spring related questions and core java

I applied via Naukri.com

Interview Questionnaire 

1 Question

  • Q1. How to sort an array list
  • Ans. 

    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

  • Answered by AI

Interview Preparation Tips

Interview preparation tips for other job seekers - Most of the questions will be based on theory like collections, immutable, wrapper classes, abstract classes, encapsulation etc

Skills evaluated in this interview

I applied via Company Website and was interviewed in Jan 2022. There was 1 interview round.

Round 1 - Technical 

(1 Question)

  • Q1. Core java interview questions

Interview Preparation Tips

Interview preparation tips for other job seekers - basic java understanding for >3 years experience

I applied via Campus Placement and was interviewed in May 2021. There were 3 interview rounds.

Interview Questionnaire 

1 Question

  • Q1. 1. What is jvm 2.Explain Oops 3.Sql queries 4. Rest Api 5. coding problem (Sort arraylist) 6. Known Sorting Algorithm
  • Ans. 

    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

  • Answered by AI

Interview Preparation Tips

Interview preparation tips for other job seekers - Don't add anything that you don't know in your resume

Skills evaluated in this interview

Cognizant Interview FAQs

How many rounds are there in Cognizant Java Developer interview?
Cognizant interview process usually has 2-3 rounds. The most common rounds in the Cognizant interview process are Technical, Resume Shortlist and HR.
How to prepare for Cognizant Java Developer interview?
Go through your CV in detail and study all the technologies mentioned in your CV. Prepare at least two technologies or languages in depth if you are appearing for a technical interview at Cognizant. The most common topics and skills that interviewers at Cognizant expect are Java, Microservices, Spring Boot, Hibernate and AWS.
What are the top questions asked in Cognizant Java Developer interview?

Some of the top questions asked at the Cognizant Java Developer interview -

  1. What array list and linkedlist difference,how hashmap internally working,what i...read more
  2. write program fibonacci series, write program using boolean, write class cast e...read more
  3. Difference between List and Set? which one to prefer in which requirements and ...read more
How long is the Cognizant Java Developer interview process?

The duration of Cognizant Java Developer interview process can vary, but typically it takes about less than 2 weeks to complete.

Tell us how to improve this page.

Cognizant Java Developer Interview Process

based on 24 interviews

3 Interview rounds

  • Resume Shortlist Round
  • Aptitude Test Round
  • HR Round
View more
Cognizant Java Developer Salary
based on 1.6k salaries
₹2.4 L/yr - ₹14.6 L/yr
41% more than the average Java Developer Salary in India
View more details

Cognizant Java Developer Reviews and Ratings

based on 142 reviews

4.0/5

Rating in categories

3.9

Skill development

3.9

Work-life balance

3.7

Salary

3.7

Job security

3.8

Company culture

3.5

Promotions

3.7

Work satisfaction

Explore 142 Reviews and Ratings
Java Developer

Hyderabad / Secunderabad,

Chennai

+1

6-11 Yrs

Not Disclosed

Face To face Interview with Cognizant - Java Developers!

Hyderabad / Secunderabad,

Chennai

+1

5-10 Yrs

Not Disclosed

Java Developer

Hyderabad / Secunderabad,

Chennai

5-10 Yrs

Not Disclosed

Explore more jobs
Associate
72.3k salaries
unlock blur

₹5.1 L/yr - ₹16 L/yr

Programmer Analyst
55.6k salaries
unlock blur

₹2.4 L/yr - ₹9.6 L/yr

Senior Associate
48.6k salaries
unlock blur

₹9 L/yr - ₹27.4 L/yr

Senior Processing Executive
28.9k salaries
unlock blur

₹1.8 L/yr - ₹9 L/yr

Technical Lead
17.6k salaries
unlock blur

₹5.9 L/yr - ₹24.9 L/yr

Explore more salaries
Compare Cognizant with

TCS

3.7
Compare

Infosys

3.6
Compare

Wipro

3.7
Compare

Accenture

3.8
Compare
Did you find this page helpful?
Yes No
write
Share an Interview