Premium Employer

i

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

Infosys Verified Tick Work with us arrow

Compare button icon Compare button icon Compare

Filter interviews by

Infosys Java Developer Interview Questions and Answers for Experienced

Updated 5 Jun 2025

26 Interview questions

A Java Developer was asked 4w ago
Q. What is a profiler?
Ans. 

A profiler is a tool that analyzes program performance, helping developers identify bottlenecks and optimize code efficiency.

  • Profiles CPU usage to identify slow methods (e.g., identifying a method that takes 80% of execution time).

  • Tracks memory usage to find memory leaks (e.g., detecting objects that are not being garbage collected).

  • Analyzes thread activity to spot concurrency issues (e.g., identifying deadlocks o...

A Java Developer was asked 2mo ago
Q. How do you define custom sorting logic?
Ans. 

Custom sorting in Java can be achieved using Comparator and Comparable interfaces for flexible sorting logic.

  • Using Comparable: Implement the Comparable interface in your class and override the compareTo method to define natural ordering. Example: public int compareTo(Person p) { return this.age - p.age; }

  • Using Comparator: Create a separate Comparator class or use a lambda expression to define custom sorting logic....

Java Developer Interview Questions Asked at Other Companies for Experienced

asked in Cognizant
Q1. What array list and linkedlist difference,how hashmap internally ... read more
asked in TCS
Q2. what are the difference between abstract class and interface, and ... read more
asked in Infosys
Q3. Write code to filter out loans with an incomplete status using Ja ... read more
asked in Cognizant
Q4. write program fibonacci series, write program using boolean, writ ... read more
asked in Capgemini
Q5. Is Java platform-independent, and if so, why?
A Java Developer was asked 2mo ago
Q. Describe the concept of a functional interface.
Ans. 

A functional interface in Java is an interface with a single abstract method, enabling the use of lambda expressions.

  • Single Abstract Method (SAM): A functional interface contains exactly one abstract method, which can be implemented using a lambda expression.

  • Common Examples: Common functional interfaces in Java include Runnable, Callable, Comparator, and Consumer.

  • Lambda Expressions: Functional interfaces enable th...

A Java Developer was asked 9mo ago
Q. What are functional Interfaces?
Ans. 

Functional interfaces are interfaces with a single abstract method, enabling lambda expressions in Java.

  • A functional interface can have multiple default or static methods but only one abstract method.

  • Common examples include Runnable, Callable, and Comparator.

  • They are used primarily in lambda expressions and method references.

  • You can define your own functional interfaces using the @FunctionalInterface annotation.

A Java Developer was asked 10mo ago
Q. What is JDK? Explain.
Ans. 

JDK stands for Java Development Kit, it is a software development kit used for developing Java applications.

  • JDK includes tools for developing, debugging, and monitoring Java applications.

  • It contains JRE (Java Runtime Environment) which is necessary for running Java programs.

  • JDK also includes a compiler, debugger, and other tools needed for Java development.

  • Examples of JDK versions include JDK 8, JDK 11, and JDK 15...

A Java Developer was asked 10mo ago
Q. What is JRE? Explain.
Ans. 

JRE stands for Java Runtime Environment, it is a software package that provides the necessary tools to run Java applications.

  • JRE includes Java Virtual Machine (JVM), class libraries, and other necessary files to run Java applications.

  • It does not contain development tools like compiler or debugger, which are included in JDK (Java Development Kit).

  • JRE is required to run Java applications on a computer, as it provide...

A Java Developer was asked 11mo ago
Q. What are the differences between HashMap and Hashtable in Java?
Ans. 

Hashtable is synchronized and does not allow null keys or values, while HashMap is not synchronized and allows null keys and values.

  • Hashtable is synchronized, while HashMap is not.

  • Hashtable does not allow null keys or values, while HashMap allows them.

  • Hashtable is thread-safe, while HashMap is not.

Are these interview questions helpful?
A Java Developer was asked
Q. If an order fails after payment has been deducted, how do you manage this situation?
Ans. 

In case of order failure with payment deducted, refund the payment and investigate the issue.

  • Initiate refund process for the deducted payment

  • Investigate the reason for the order failure

  • Communicate with the customer about the issue and resolution

  • Ensure the payment gateway is functioning correctly to prevent future occurrences

A Java Developer was asked
Q. What are constructors and what are the different types of constructors?
Ans. 

Constructors are special methods used to initialize objects in Java.

  • Constructors have the same name as the class and do not have a return type.

  • Types of constructors include default constructor, parameterized constructor, and copy constructor.

  • Default constructor is provided by Java if no constructor is defined.

  • Parameterized constructor takes parameters to initialize an object with specific values.

  • Copy constructor c...

A Java Developer was asked
Q. What is FlatMap?
Ans. 

FlatMap is a method in Java that transforms each element of a stream into a new stream and then concatenates all the streams into a single stream.

  • FlatMap is used to flatten nested collections or maps into a single collection.

  • It is commonly used in Java streams to process and transform data efficiently.

  • Example: List<List<Integer>> nestedList = Arrays.asList(Arrays.asList(1, 2), Arrays.asList(3, 4)); nested...

Infosys Java Developer Interview Experiences for Experienced

39 interviews found

Interview experience
5
Excellent
Difficulty level
Moderate
Process Duration
Less than 2 weeks
Result
Not Selected

I appeared for an interview in May 2025, where I was asked the following questions.

  • Q1. What is profiler
  • Ans. 

    A profiler is a tool that analyzes program performance, helping developers identify bottlenecks and optimize code efficiency.

    • Profiles CPU usage to identify slow methods (e.g., identifying a method that takes 80% of execution time).

    • Tracks memory usage to find memory leaks (e.g., detecting objects that are not being garbage collected).

    • Analyzes thread activity to spot concurrency issues (e.g., identifying deadlocks or thr...

  • Answered by AI
  • Q2. Reverse string using stream api
  • Ans. 

    Use Java Stream API to reverse a string by converting it to a character array and collecting it in reverse order.

    • Convert the string to a character array: `char[] chars = str.toCharArray();`

    • Use `IntStream.range` to create a stream of indices in reverse order: `IntStream.range(0, chars.length).map(i -> chars[chars.length - 1 - i])`.

    • Collect the characters back into a string: `String reversed = new String(result.toArray...

  • Answered by AI

Interview Preparation Tips

Interview preparation tips for other job seekers - na

Java Developer Interview Questions & Answers

user image Alaguraja M

posted on 4 Feb 2025

Interview experience
5
Excellent
Difficulty level
Moderate
Process Duration
2-4 weeks
Result
Selected Selected

I appeared for an interview in Aug 2024.

Round 1 - One-on-one 

(1 Question)

  • Q1. It's a technical discussion and it was lasted around 45 minutes.
Round 2 - One-on-one 

(1 Question)

  • Q1. It's a managerial round and it was lasted around 30 minutes.
Round 3 - HR 

(1 Question)

  • Q1. It's just final and usual formality round and lasted around 15 minutes.
Interview experience
5
Excellent
Difficulty level
-
Process Duration
-
Result
-
Round 1 - Technical 

(2 Questions)

  • Q1. What is daemon thread?
  • Q2. Profile in springboot
  • Ans. 

    Spring Boot profiles allow you to define different configurations for different environments.

    • Profiles are defined in application.properties or application.yml files.

    • Use @Profile annotation to specify beans for specific profiles.

    • Activate a profile using the command line: --spring.profiles.active=dev

    • Example: application-dev.properties for development settings.

    • Profiles can help manage different database configurations for...

  • Answered by AI

Skills evaluated in this interview

Interview experience
5
Excellent
Difficulty level
Moderate
Process Duration
6-8 weeks
Result
Selected Selected

I applied via Job Portal and was interviewed in Aug 2024. There were 2 interview rounds.

Round 1 - Technical 

(1 Question)

  • Q1. Functional interface, hashmap
Round 2 - HR 

(1 Question)

  • Q1. Salary discussion
Interview experience
4
Good
Difficulty level
-
Process Duration
-
Result
-
Round 1 - Technical 

(1 Question)

  • Q1. What are @annotations in springboot? explain about @springBootApplication
  • Ans. 

    Annotations in Spring Boot are used to provide metadata about the code. @SpringBootApplication is a meta-annotation that combines @Configuration, @EnableAutoConfiguration, and @ComponentScan.

    • Annotations in Spring Boot are used to simplify configuration and reduce boilerplate code.

    • @SpringBootApplication is a meta-annotation that enables the auto-configuration feature in Spring Boot.

    • It combines @Configuration, @EnableAut...

  • Answered by AI

Skills evaluated in this interview

Java Developer Interview Questions & Answers

user image Ravi Prabhat Singh

posted on 26 Apr 2025

Interview experience
5
Excellent
Difficulty level
Moderate
Process Duration
Less than 2 weeks
Result
Not Selected

I appeared for an interview in Mar 2025, where I was asked the following questions.

  • Q1. WHAT IS OOPS
  • Q2. How to define custom sorting logic
  • Q3. Describe about functional interface
  • Q4. Important features of Java 8
  • Ans. 

    Java 8 introduced significant features like lambdas, streams, and the new date/time API, enhancing productivity and code readability.

    • Lambda Expressions: Allow you to write concise and expressive code by enabling you to treat functionality as a method argument. Example: (a, b) -> a + b.

    • Streams API: Provides a powerful way to process sequences of elements, enabling functional-style operations on collections. Example: ...

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

I applied via Referral and was interviewed in Apr 2024. There were 3 interview rounds.

Round 1 - Technical 

(2 Questions)

  • Q1. Java 8 related questions with some basic coding using java 8.
  • Q2. Print some thing java 8 lambda expression
Round 2 - Technical 

(1 Question)

  • Q1. Project related questions and some coding questions
Round 3 - HR 

(1 Question)

  • Q1. Work Details, education details

Skills evaluated in this interview

Interview experience
4
Good
Difficulty level
Moderate
Process Duration
2-4 weeks
Result
No response

I applied via Referral and was interviewed in Mar 2024. There was 1 interview round.

Round 1 - Technical 

(5 Questions)

  • Q1. What is Functional Interface? What is Flat Map? What is Method Reference? What is stream API
  • Ans. 

    Functional Interface is an interface with only one abstract method. Flat Map is used to flatten nested collections. Method Reference is a shorthand notation for lambda expressions. Stream API is used to process collections of objects.

    • Functional Interface is an interface with a single abstract method, such as Runnable or Comparator.

    • Flat Map is a method in Java that is used to flatten nested collections, like List<Lis...

  • Answered by AI
  • Q2. What is Flat Map
  • Q3. What is Stream API
  • Q4. How you handle logs in previous company
  • Ans. 

    In my previous company, I implemented structured logging and centralized log management for better monitoring and debugging.

    • Utilized SLF4J with Logback for logging, allowing for flexible configuration and log formatting.

    • Implemented log levels (INFO, DEBUG, ERROR) to control the verbosity of logs based on the environment.

    • Set up centralized logging using ELK stack (Elasticsearch, Logstash, Kibana) for real-time log analy...

  • Answered by AI
  • Q5. What is functional interface

Interview Preparation Tips

Interview preparation tips for other job seekers - Learn Java 8 Features as well as Log4J

Skills evaluated in this interview

Interview experience
3
Average
Difficulty level
Moderate
Process Duration
Less than 2 weeks
Result
Not Selected

I applied via Naukri.com and was interviewed in May 2024. There was 1 interview round.

Round 1 - Technical 

(2 Questions)

  • Q1. How can you write custom exception in Java?
  • Ans. 

    To write a custom exception in Java, create a new class that extends Exception or a subclass of Exception.

    • Create a new class that extends Exception or a subclass of Exception.

    • Add a constructor to the custom exception class to pass a message to the superclass constructor.

    • Throw the custom exception using the 'throw' keyword in your code.

    • Handle the custom exception using try-catch blocks or propagate it up the call stack.

  • Answered by AI
  • Q2. Explain internal working of HashMap

Interview Preparation Tips

Interview preparation tips for other job seekers - Practice core java and java8 features

Skills evaluated in this interview

Interview experience
4
Good
Difficulty level
-
Process Duration
-
Result
-

I applied via Job Portal and was interviewed in Aug 2024. There was 1 interview round.

Round 1 - Coding Test 

Coding test time duration was 45 mins. Question was related to string array checking the good arrray on condition of no occurrence of characters.

What people are saying about Infosys

View All
schedule2
Verified Icon
6d
works at
Cognizant
Salary expectation
I have 5+ years of experience in springboot microservices, currently working in CTS and having 10L CTC , wanted to switch in Infosys or Accenture like companies, how much should I ask for 15L-18L ? Just worried if I ask more they can reject my application, please help me with some numbers
Got a question about Infosys?
Ask anonymously on communities.

Infosys Interview FAQs

How many rounds are there in Infosys Java Developer interview for experienced candidates?
Infosys interview process for experienced candidates usually has 1-2 rounds. The most common rounds in the Infosys interview process for experienced candidates are Technical, HR and Resume Shortlist.
How to prepare for Infosys Java Developer interview for experienced candidates?
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 Infosys. The most common topics and skills that interviewers at Infosys expect are Java, Microservices, Hibernate, Spring Boot and Java Spring Boot.
What are the top questions asked in Infosys Java Developer interview for experienced candidates?

Some of the top questions asked at the Infosys Java Developer interview for experienced candidates -

  1. write a code to filter out loans with incomplete status using java 8 featur...read more
  2. What is java and what is inheritance and what is oops concepts and what is meth...read more
  3. What is polymorphism in both overloading and overriding wa...read more
What are the most common questions asked in Infosys Java Developer HR round for experienced candidates?

The most common HR questions asked in Infosys Java Developer interview are for experienced candidates -

  1. What are your strengths and weakness...read more
  2. What are your salary expectatio...read more
How long is the Infosys Java Developer interview process?

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

Tell us how to improve this page.

Overall Interview Experience Rating

4.3/5

based on 28 interview experiences

Difficulty level

Easy 20%
Moderate 80%

Duration

Less than 2 weeks 46%
2-4 weeks 31%
4-6 weeks 15%
6-8 weeks 8%
View more
Join Infosys Creating the next opportunity for people, businesses & communities
Infosys Java Developer Salary
based on 1.6k salaries
₹2 L/yr - ₹11 L/yr
At par with the average Java Developer Salary in India
View more details

Infosys Java Developer Reviews and Ratings

based on 135 reviews

3.7/5

Rating in categories

3.7

Skill development

3.7

Work-life balance

3.1

Salary

3.8

Job security

3.8

Company culture

2.9

Promotions

3.5

Work satisfaction

Explore 135 Reviews and Ratings
Java Developer - Gurugram

Chennai,

Bangalore / Bengaluru

+1

5-10 Yrs

Not Disclosed

Java Developer - gurugram

Hyderabad / Secunderabad,

Chennai

+1

10-16 Yrs

Not Disclosed

Java Developer

Bangalore / Bengaluru

3-5 Yrs

₹ 3.6-9 LPA

Explore more jobs
Technology Analyst
55.8k salaries
unlock blur

₹4.8 L/yr - ₹11.2 L/yr

Senior Systems Engineer
53.7k salaries
unlock blur

₹2.5 L/yr - ₹6.3 L/yr

Technical Lead
35k salaries
unlock blur

₹7.3 L/yr - ₹20 L/yr

System Engineer
32.5k salaries
unlock blur

₹2.4 L/yr - ₹5.3 L/yr

Senior Associate Consultant
31k salaries
unlock blur

₹6.3 L/yr - ₹17 L/yr

Explore more salaries
Compare Infosys with

TCS

3.6
Compare

Wipro

3.7
Compare

Cognizant

3.7
Compare

Accenture

3.8
Compare
write
Share an Interview