i
Infosys
Work with us
Filter interviews by
Java 8 provides a concise way to reverse a string using streams and collectors.
Use the StringBuilder class: StringBuilder sb = new StringBuilder(originalString); sb.reverse();
Utilize Java 8 Streams: String reversed = originalString.chars().mapToObj(c -> (char) c).reduce("", (s, c) -> c + s);
Another approach is to convert the string to a char array, reverse it, and create a new string: char[] charArray = orig...
Retrieve data from a database using REST API in Spring Boot involves creating a controller, service, and repository.
1. Create a Spring Boot application with necessary dependencies (Spring Web, Spring Data JPA, etc.).
2. Define an entity class that maps to the database table.
Example: @Entity public class User { @Id private Long id; private String name; }
3. Create a repository interface extending JpaRepository for...
Stateless API does not store client state on the server, while stateful API does.
Stateless API: Each request from client to server must contain all necessary information for the server to fulfill the request. No client state is stored on the server. Example: RESTful APIs.
Stateful API: The server stores client state, which can be accessed by subsequent requests. Example: HTTP sessions.
Spring is a framework for building Java applications, while Spring Boot is a tool for easily creating stand-alone, production-grade Spring-based applications.
Spring is a framework that provides comprehensive infrastructure support for developing Java applications.
Spring Boot is a tool that simplifies the process of creating and deploying Spring-based applications.
Spring Boot includes embedded servers, which makes ...
Rest controllers are specifically used for RESTful web services, while normal controllers are used for traditional web applications.
Rest controllers are used to build RESTful web services that can accept and return JSON or XML data.
Normal controllers are used for traditional web applications that render HTML views.
Rest controllers use annotations like @RestController and @RequestMapping to define endpoints.
Normal ...
Memory leak is a situation where a program uses memory inefficiently, causing memory to be allocated but not released.
Memory leak occurs when a program allocates memory but does not release it after it is no longer needed.
Identifying memory leaks can be done using tools like profilers to analyze memory usage over time.
Common signs of memory leaks include increasing memory usage over time, frequent garbage collecti...
The question covers topics like method overriding, method overloading, exceptions, Java 8 features, and string manipulation.
Method overriding is when a subclass provides a specific implementation of a method that is already provided by its superclass.
Method overloading is when multiple methods have the same name but different parameters.
Exception handling is used to handle errors that occur during the execution of...
A singleton class is a class that allows only one instance of itself to be created and provides a global point of access to that instance.
Singleton classes are often used in Spring Boot for managing resources such as database connections or thread pools.
In Spring Boot, singleton beans are created by default, meaning that only one instance of a bean is created and shared across the application.
To create a singleton...
I appeared for an interview in May 2025, where I was asked the following questions.
Retrieve data from a database using REST API in Spring Boot involves creating a controller, service, and repository.
1. Create a Spring Boot application with necessary dependencies (Spring Web, Spring Data JPA, etc.).
2. Define an entity class that maps to the database table.
Example: @Entity public class User { @Id private Long id; private String name; }
3. Create a repository interface extending JpaRepository for CRUD...
Dependency injection is a design pattern that allows a class to receive its dependencies from an external source rather than creating them itself.
Promotes loose coupling between classes, enhancing testability and maintainability.
Types of dependency injection include Constructor Injection, Setter Injection, and Interface Injection.
Example of Constructor Injection: A class 'Car' that requires an 'Engine' can receive it t...
Java 8 provides a concise way to reverse a string using streams and collectors.
Use the StringBuilder class: StringBuilder sb = new StringBuilder(originalString); sb.reverse();
Utilize Java 8 Streams: String reversed = originalString.chars().mapToObj(c -> (char) c).reduce("", (s, c) -> c + s);
Another approach is to convert the string to a char array, reverse it, and create a new string: char[] charArray = originalS...
This code demonstrates how to convert a string into a character array in Java.
Use the `toCharArray()` method: `char[] chars = str.toCharArray();`
Example: `String str = "Hello"; char[] chars = str.toCharArray();`
Iterate through the array: `for (char c : chars) { System.out.println(c); }`
You can also use `String.split()` for separating by delimiters, but it returns a String array.
I appeared for an interview in Jul 2024.
The question covers topics like method overriding, method overloading, exceptions, Java 8 features, and string manipulation.
Method overriding is when a subclass provides a specific implementation of a method that is already provided by its superclass.
Method overloading is when multiple methods have the same name but different parameters.
Exception handling is used to handle errors that occur during the execution of a pr...
I applied via Job Portal and was interviewed in May 2024. There were 2 interview rounds.
A singleton class is a class that allows only one instance of itself to be created and provides a global point of access to that instance.
Singleton classes are often used in Spring Boot for managing resources such as database connections or thread pools.
In Spring Boot, singleton beans are created by default, meaning that only one instance of a bean is created and shared across the application.
To create a singleton bean...
I applied via LinkedIn and was interviewed in May 2024. There were 2 interview rounds.
Answers to common Java Spring Boot Developer interview questions.
Java8 features include lambda expressions, functional interfaces, streams, and default methods.
String is immutable in Java to ensure thread safety and prevent unintended modifications.
Checked exceptions are checked at compile time, while unchecked exceptions are not. Example: IOException vs NullPointerException.
throw is used to explicitly throw an excepti...
I applied via Referral and was interviewed in Feb 2024. There was 1 interview round.
Spring is a framework for building Java applications, while Spring Boot is a tool for easily creating stand-alone, production-grade Spring-based applications.
Spring is a framework that provides comprehensive infrastructure support for developing Java applications.
Spring Boot is a tool that simplifies the process of creating and deploying Spring-based applications.
Spring Boot includes embedded servers, which makes it ea...
Stateless API does not store client state on the server, while stateful API does.
Stateless API: Each request from client to server must contain all necessary information for the server to fulfill the request. No client state is stored on the server. Example: RESTful APIs.
Stateful API: The server stores client state, which can be accessed by subsequent requests. Example: HTTP sessions.
Explanation of Java features, Stream API, microservices, HTTP vs HTTPS, and SQL joins.
Lambda expressions allow for concise syntax to implement functional interfaces.
Stream API provides a way to process collections of objects in a functional style.
Microservices architecture breaks down applications into smaller, independent services.
HTTP is unencrypted protocol, HTTPS is encrypted using SSL/TLS for secure communication.
...
I applied via Company Website and was interviewed in Jan 2024. There was 1 interview round.
I applied via Company Website and was interviewed in Apr 2023. There were 3 interview rounds.
Details on past project experience
Rest controllers are specifically used for RESTful web services, while normal controllers are used for traditional web applications.
Rest controllers are used to build RESTful web services that can accept and return JSON or XML data.
Normal controllers are used for traditional web applications that render HTML views.
Rest controllers use annotations like @RestController and @RequestMapping to define endpoints.
Normal contr...
Memory leak is a situation where a program uses memory inefficiently, causing memory to be allocated but not released.
Memory leak occurs when a program allocates memory but does not release it after it is no longer needed.
Identifying memory leaks can be done using tools like profilers to analyze memory usage over time.
Common signs of memory leaks include increasing memory usage over time, frequent garbage collection, a...
I applied via Approached by Company and was interviewed in Dec 2021. There was 1 interview round.
What people are saying about Infosys
I applied via Company Website and was interviewed before Jun 2021. There were 2 interview rounds.
First round was coding as well as aptitude done together went well I guess focusing on codes helps a lot.
Some of the top questions asked at the Infosys Java Spring Boot Developer interview -
The duration of Infosys Java Spring Boot Developer interview process can vary, but typically it takes about less than 2 weeks to complete.
based on 9 interview experiences
Difficulty level
Duration
based on 4 reviews
Rating in categories
Technology Analyst
55.8k
salaries
| ₹3 L/yr - ₹11.6 L/yr |
Senior Systems Engineer
53.7k
salaries
| ₹2.5 L/yr - ₹8.3 L/yr |
Technical Lead
35k
salaries
| ₹7.3 L/yr - ₹20 L/yr |
System Engineer
32.4k
salaries
| ₹2.4 L/yr - ₹5.5 L/yr |
Senior Associate Consultant
31k
salaries
| ₹6.3 L/yr - ₹17 L/yr |
TCS
Wipro
Cognizant
Accenture