i
Infosys
Filter interviews by
I applied via LinkedIn and was interviewed in Aug 2024. There was 1 interview round.
Spring filters are components in Spring framework that intercept incoming HTTP requests and outgoing HTTP responses.
Filters are used to perform tasks like logging, authentication, authorization, etc.
They are configured in the web.xml file or using annotations like @WebFilter.
Example: javax.servlet.Filter interface is implemented to create custom filters.
Flat map is used to flatten nested collections, while map is used to transform elements in a collection.
Flat map is used when you have a collection of collections and you want to flatten it into a single collection.
Map is used to transform each element in a collection using a given function.
Example: Using flatMap to flatten a list of lists - list.stream().flatMap(List::stream).collect(Collectors.toList())
Example: Using...
Stream API in Java 8 allows for functional-style operations on collections.
Stream API provides a way to process collections of objects in a functional way.
It supports operations like filter, map, reduce, and collect.
Example: List
Example: List
Java 8 introduced parallel programming concepts like streams, parallel streams, and CompletableFuture.
Java 8 introduced streams which allow for functional-style operations on collections.
Parallel streams allow for parallel processing of stream elements, improving performance on multi-core processors.
CompletableFuture class enables asynchronous programming by representing a future result of an asynchronous computation.
Abstract classes can have both abstract and non-abstract methods, while interfaces can only have abstract methods.
Abstract classes can have constructors, fields, and methods, while interfaces cannot.
A class can implement multiple interfaces but can only extend one abstract class.
Abstract classes are used to define a common behavior for subclasses, while interfaces are used to define a contract for classes to implement.
...
SOLID is a set of five design principles to make software designs more understandable, flexible, and maintainable.
S - Single Responsibility Principle: A class should have only one reason to change.
O - Open/Closed Principle: Software entities should be open for extension but closed for modification.
L - Liskov Substitution Principle: Objects of a superclass should be replaceable with objects of its subclasses without aff...
Static keyword is used in Java to create class-level variables and methods.
Static variables are shared among all instances of a class
Static methods can be called without creating an instance of the class
Static keyword can also be used to create static blocks for initialization
I applied via Company Website and was interviewed in Jan 2024. There was 1 interview round.
Method overloading is having multiple methods in the same class with the same name but different parameters. Method overriding is having a method in a subclass with the same name and parameters as a method in its superclass.
Method overloading allows a class to have multiple methods with the same name but different parameters.
Method overriding occurs when a subclass provides a specific implementation of a method that is...
RestController is specialized version of controller used for RESTful web services in Spring framework.
RestController is used to create RESTful web services that return JSON or XML data, while Controller is used to create web pages that return HTML data.
RestController annotation is a combination of @Controller and @ResponseBody annotations.
RestController is typically used for building RESTful APIs, while Controller is u...
The @Bean annotation is used to define a method that returns an object to be registered as a bean in the Spring application context. The @Component annotation is used to indicate that a class is a Spring component.
The @Bean annotation is used on methods within a @Configuration class to define Spring beans.
The @Component annotation is used on classes to indicate that they are Spring components.
The @Bean annotation allow...
Bean factory is a container for managing beans in Spring framework.
Bean factory is responsible for creating, managing, and configuring beans in a Spring application.
It uses inversion of control (IoC) to manage the beans.
Beans are defined in a configuration file (XML or Java) and the bean factory instantiates them.
Example: ApplicationContext is a type of bean factory in Spring framework.
Singleton is a design pattern that restricts the instantiation of a class to only one object.
Ensures a class has only one instance and provides a global point of access to it.
Commonly used in scenarios where a single instance of a class is needed, such as database connections or thread pools.
Implemented by creating a static method to return the same instance of the class every time it is called.
I applied via Company Website and was interviewed before Aug 2022. There were 2 interview rounds.
I applied via Approached by Company and was interviewed in Apr 2022. There were 3 interview rounds.
The question covers various topics related to SpringBoot development.
LinkedList vs ArrayList: LinkedList is better for frequent insertions/deletions, ArrayList is better for frequent access.
Tomcat vs other application servers: Tomcat is a lightweight server, while others like JBoss are more feature-rich.
AJAX JSON: AJAX is used to make asynchronous requests to the server, while JSON is a lightweight data interchange for...
Infosys interview questions for designations
Get interview-ready with Top Infosys Interview Questions
What people are saying about Infosys
I applied via Walk-in
Create a Spring Boot application to generate an XML file from two input values.
Create a Spring Boot project using Spring Initializr
Create a REST controller to accept two input values
Use JAXB to generate XML from the input values
Return the generated XML file as response
Program to insert comma after every character in a string.
Iterate through each character in the string
Append the character and a comma to a new string
Handle the last character to avoid adding an extra comma
Use SQL query with ROW_NUMBER() function to find the third max salary in Oracle.
Use ROW_NUMBER() function to assign a unique row number to each row based on the salary in descending order.
Filter the result where the row number is 3 to get the third max salary.
Circuit breaker is a design pattern used in microservices to prevent cascading failures.
Circuit breaker is used to detect failures and prevent them from causing further issues.
It works by wrapping a protected function call in a circuit breaker object.
Annotations like @CircuitBreaker in Spring Cloud are used to implement circuit breaker pattern.
These annotations allow developers to easily add circuit breaker functionali
JPA is a specification while Hibernate is an implementation of JPA.
JPA is a Java specification for managing relational data in applications.
Hibernate is an ORM framework that implements the JPA specification.
Hibernate provides additional features beyond JPA, such as caching and lazy loading.
JPA is vendor-neutral, allowing developers to switch between different JPA implementations.
Hibernate is a popular choice for JPA i...
I applied via Naukri.com and was interviewed in Oct 2022. There were 3 interview rounds.
Java is a popular programming language used for developing various applications. A variable is a named memory location used to store data.
Java is an object-oriented language
It is platform-independent
Variables in Java have a specific data type
Variables can be assigned values and their values can be changed
Example: int age = 25; String name = "John";
Inheritance is a concept in object-oriented programming where a class inherits properties and behaviors from another class.
Inheritance allows code reuse and promotes code organization.
There are different types of inheritance: single inheritance, multiple inheritance, multilevel inheritance, and hierarchical inheritance.
Single inheritance involves a class inheriting from a single base class.
Multiple inheritance involves...
Inheritance is acquiring properties of parent class to child class without changing parent class properties. It is classified into 5 types.
Inheritance is a way to reuse code and establish a relationship between classes
The 'extends' keyword is used to implement inheritance in Java
Examples of inheritance include a 'Car' class inheriting properties from a 'Vehicle' class
Single level inheritance involves one parent class a...
May I about you ? Which your qualification and which stream
I applied via Naukri.com and was interviewed in Jan 2022. There were 3 interview rounds.
Answers to common Java Developer interview questions.
super keyword is used to call a method or constructor of the parent class
Interface is a collection of abstract methods and constants that can be implemented by a class
Constructor is a special method used to initialize objects
@Componentscan is used to scan for Spring components in a specified package
I applied via Naukri.com and was interviewed in Nov 2021. There was 1 interview round.
To add a new server in Spring Boot, you need to exclude the default Tomcat dependency and add the desired server dependency.
Exclude the Tomcat dependency in the pom.xml file
Add the desired server dependency in the pom.xml file
Configure the server properties in the application.properties or application.yml file
Checking if a string is not null without using string != null.
Use string.IsNullOrEmpty() method
Use string.IsNullOrWhiteSpace() method
Use string.Compare() method to compare with an empty string
Use string.Length property to check if length is greater than 0
Yoda notation is a programming style where the order of a conditional statement is reversed.
Used to avoid null pointer exceptions
Improves readability for complex conditions
Example: if ('red' === color) instead of if (color === 'red')
Convert a List of employees into a Map of Employees with ID as the key.
Create an empty Map
Iterate through the List of employees
For each employee, add a key-value pair to the Map with ID as key and employee object as value
I applied via Job boards and was interviewed in Sep 2021. There were 4 interview rounds.
Use a physical medium like a USB drive or a portable storage device to transfer the file.
Physically carry the file on a USB drive or portable storage device.
Use a local network connection to transfer the file between the two floors.
Utilize Bluetooth or other wireless technologies to transfer the file.
If the distance is short, use a physical method like printing the file and physically handing it over.
JVM stands for Java Virtual Machine. It is an abstract machine that enables a computer to run Java programs.
JVM is responsible for interpreting the compiled Java code and executing it on the computer.
It provides a platform-independent environment for Java programs to run on different operating systems.
JVM has various components like Class Loader, Bytecode Verifier, Just-In-Time Compiler, and Garbage Collector.
Examples ...
JDK memories are areas of memory used by Java programs to store data and code.
JDK memories include heap memory, stack memory, and non-heap memory.
Heap memory is used to store objects and is managed by the garbage collector.
Stack memory is used to store method calls and local variables.
Non-heap memory is used to store class definitions and other data.
Examples of non-heap memory include the method area and the permanent ...
based on 2 reviews
Rating in categories
Technology Analyst
56.2k
salaries
| ₹3 L/yr - ₹11 L/yr |
Senior Systems Engineer
49.7k
salaries
| ₹2.8 L/yr - ₹8 L/yr |
System Engineer
39k
salaries
| ₹2.5 L/yr - ₹5.5 L/yr |
Technical Lead
30.7k
salaries
| ₹5.2 L/yr - ₹19.5 L/yr |
Senior Associate Consultant
27.1k
salaries
| ₹4.3 L/yr - ₹16.8 L/yr |
TCS
Wipro
Cognizant
Accenture