Fujitsu
10+ Teleperformance Interview Questions and Answers
Autowiring in Spring Boot is a feature that allows Spring to automatically inject dependencies into a Spring bean.
Autowiring eliminates the need for explicit bean wiring in the Spring configuration file.
There are different modes of autowiring in Spring Boot: 'byName', 'byType', 'constructor', 'autodetect', and 'no'.
For example, 'byName' autowiring matches and injects a bean based on the name of the bean property.
Java code is compiled into bytecode which can run on any platform with JVM, making it platform independent. JVM itself is platform dependent as it needs to be installed on each platform to execute the bytecode.
Java code is compiled into bytecode, which is a platform-independent intermediate code
JVM interprets and executes the bytecode on different platforms
JVM needs to be installed on each platform to run Java programs
This allows Java programs to be written once and run anywh...read more
SOLID principles are a set of five design principles in object-oriented programming 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 affecting the corr...read more
Optional class in Java provides a way to handle null values more effectively.
Prevents NullPointerException by explicitly checking for null values
Encourages developers to handle null values properly
Improves code readability and maintainability
Helps avoid unnecessary null checks and nested if statements
setMaxResults() limits the number of results returned by a query, while setFetchSize() determines the number of rows fetched at a time from the database.
setMaxResults() is used to limit the number of results returned by a query.
setFetchSize() determines the number of rows fetched at a time from the database.
setMaxResults() is typically used for pagination purposes, while setFetchSize() can improve performance by reducing the number of round trips to the database.
Example: setM...read more
Abstract class can have method implementations, while interface cannot.
Abstract class can have method implementations, while interface cannot
Abstract class can have constructors, while interface cannot
A class can implement multiple interfaces, but can only inherit from one abstract class
Abstraction in OOP is the concept of hiding complex implementation details and showing only the necessary features of an object.
Abstraction allows developers to focus on what an object does rather than how it does it
It helps in reducing complexity and improving code reusability
Example: In a car object, we only need to know how to drive it (interface) without worrying about the internal engine workings (implementation)
Standard Java pre-defined functional interfaces include Function, Consumer, Predicate, Supplier, etc.
Function: Represents a function that accepts one argument and produces a result. Example: Function<Integer, String>
Consumer: Represents an operation that accepts a single input argument and returns no result. Example: Consumer<String>
Predicate: Represents a predicate (boolean-valued function) of one argument. Example: Predicate<Integer>
Supplier: Represents a supplier of result...read more
The @RestController annotation in Spring Boot is used to define a class as a RESTful controller.
Used to create RESTful web services in Spring Boot
Combines @Controller and @ResponseBody annotations
Eliminates the need to annotate each method with @ResponseBody
Microservice Architecture is an architectural style that structures an application as a collection of loosely coupled services.
Microservices are small, independent services that work together to form a complete application.
Each microservice is responsible for a specific business function and can be developed, deployed, and scaled independently.
Communication between microservices is typically done through APIs.
Microservices promote flexibility, scalability, and resilience in a...read more
Spring Cloud addresses issues related to microservices architecture and cloud-native applications.
Service discovery and registration
Load balancing
Circuit breakers
Distributed messaging
Configuration management
Fault tolerance
Monitoring and tracing
Spring supports five bean scopes: singleton, prototype, request, session, and application.
Singleton scope: Default scope, only one instance per Spring container
Prototype scope: New instance created each time bean is requested
Request scope: Bean is created once per HTTP request
Session scope: Bean is created once per HTTP session
Application scope: Bean is created once per ServletContext
The @SpringBootApplication annotation is used to mark a configuration class that declares one or more @Bean methods and also triggers auto-configuration and component scanning.
Marks a class as a Spring Boot application
Enables auto-configuration of the Spring application context
Performs component scanning for Spring components
Combines @Configuration, @EnableAutoConfiguration, and @ComponentScan annotations
Hibernate provides several concurrency strategies like optimistic locking, pessimistic locking, and versioning.
Optimistic locking: Allows multiple transactions to read and write to the database without locking the data. It checks for conflicts before committing the transaction.
Pessimistic locking: Locks the data when a transaction reads it, preventing other transactions from accessing it until the lock is released.
Versioning: Uses a version number to track changes to an entit...read more
Java Strings are immutable to ensure data integrity, thread safety, and security.
Immutable strings prevent accidental modification of data.
String pool optimization is possible due to immutability.
Thread safety is ensured as strings cannot be modified concurrently.
Security is enhanced as sensitive information cannot be altered.
A classloader in Java is a part of the Java Runtime Environment that dynamically loads Java classes into the Java Virtual Machine.
Classloaders are responsible for loading classes at runtime based on the fully qualified name of the class.
There are different types of classloaders in Java such as Bootstrap Classloader, Extension Classloader, and Application Classloader.
Classloaders follow a delegation model where a classloader delegates the class loading to its parent classloade...read more
Top Senior Application Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month