i
Infosys
Work with us
Filter interviews by
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...
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....
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...
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.
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...
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...
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.
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
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...
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...
I appeared for an interview in May 2025, where I was asked the following questions.
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...
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...
I appeared for an interview in Aug 2024.
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...
I applied via Job Portal and was interviewed in Aug 2024. There were 2 interview rounds.
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...
I appeared for an interview in Mar 2025, where I was asked the following questions.
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: ...
I applied via Referral and was interviewed in Apr 2024. There were 3 interview rounds.
I applied via Referral and was interviewed in Mar 2024. There was 1 interview round.
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...
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...
I applied via Naukri.com and was interviewed in May 2024. There was 1 interview round.
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.
I applied via Job Portal and was interviewed in Aug 2024. There was 1 interview round.
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
Some of the top questions asked at the Infosys Java Developer interview for experienced candidates -
The duration of Infosys Java Developer interview process can vary, but typically it takes about less than 2 weeks to complete.
based on 28 interview experiences
Difficulty level
Duration
based on 135 reviews
Rating in categories
Technology Analyst
55.8k
salaries
| ₹4.8 L/yr - ₹11.2 L/yr |
Senior Systems Engineer
53.7k
salaries
| ₹2.5 L/yr - ₹6.3 L/yr |
Technical Lead
35k
salaries
| ₹7.3 L/yr - ₹20 L/yr |
System Engineer
32.5k
salaries
| ₹2.4 L/yr - ₹5.3 L/yr |
Senior Associate Consultant
31k
salaries
| ₹6.3 L/yr - ₹17 L/yr |
TCS
Wipro
Cognizant
Accenture