FRSPL
10+ Fxonet Interview Questions and Answers
Q1. What is a bean in spring? What is a spring bean life cycle?
A bean in Spring is a Java object managed by the Spring IoC container. Spring bean life cycle includes instantiation, initialization, and destruction.
A Spring bean is a Java object that is instantiated, assembled, and managed by the Spring IoC container.
The life cycle of a Spring bean includes instantiation, initialization, in-use, and destruction phases.
Spring provides various ways to define beans, such as XML configuration, Java configuration, and annotation-based configura...read more
Q2. What are different types of object relations we can have in Hibernate? Explain them
Different types of object relations in Hibernate include one-to-one, one-to-many, many-to-one, and many-to-many.
One-to-one: Each record in one table is related to only one record in another table.
One-to-many: Each record in one table can be related to multiple records in another table.
Many-to-one: Multiple records in one table can be related to only one record in another table.
Many-to-many: Multiple records in one table can be related to multiple records in another table.
Q3. What do you mean by asynchronous operations and how do you handle them
Asynchronous operations allow tasks to be executed independently of the main program flow, improving performance and responsiveness.
Asynchronous operations are tasks that can run independently of the main program flow, allowing other tasks to continue without waiting for them to finish.
In Java, asynchronous operations can be handled using features like CompletableFuture, ExecutorService, and callbacks.
Example: Using CompletableFuture to perform a time-consuming task in a sepa...read more
Q4. What are different design patterns you are familiar with.
I am familiar with Singleton, Factory, Observer, and Strategy design patterns.
Singleton pattern ensures a class has only one instance and provides a global point of access to it.
Factory pattern creates objects without specifying the exact class of object that will be created.
Observer pattern defines a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.
Strategy pattern defines a family of algo...read more
Q5. How do you pass an object in an API request body
Passing an object in an API request body involves serializing the object into JSON or XML format.
Serialize the object into JSON or XML format before sending it in the request body
Use libraries like Jackson or Gson in Java to convert the object to JSON
Set the content type of the request to application/json or application/xml
Q6. What are different types of cloning in javascript?
There are two types of cloning in JavaScript: Shallow cloning and Deep cloning.
Shallow cloning creates a new object and copies the references of the original object's properties.
Deep cloning creates a new object and recursively copies all nested objects and their properties.
Shallow cloning can be achieved using Object.assign() or the spread operator (...).
Deep cloning can be achieved using libraries like Lodash or by implementing a custom recursive function.
Q7. Difference between lazy and eager initialisation. Pros and cons. Applications of them.
Lazy initialization delays the creation of an object until it is actually needed, while eager initialization creates the object immediately.
Lazy initialization can improve performance by only creating objects when necessary.
Eager initialization can lead to higher memory usage as objects are created upfront.
Lazy initialization is commonly used in singleton design pattern to delay the creation of the instance until it is requested.
Eager initialization is suitable for objects th...read more
Q8. Difference between promise.all and promise.AllSettled
promise.all waits for all promises to be resolved or any to be rejected, while promise.allSettled waits for all promises to be settled (either resolved or rejected)
promise.all waits for all promises to be resolved or any to be rejected
promise.allSettled waits for all promises to be settled (either resolved or rejected)
promise.all will reject immediately if any promise is rejected, while promise.allSettled always resolves with an array of results
Q9. What is an ORM framework?
ORM framework stands for Object-Relational Mapping framework, which is used to map objects in code to tables in a database.
ORM frameworks help developers to interact with databases using objects instead of SQL queries.
They provide a way to perform CRUD operations on database tables using object-oriented programming.
Popular ORM frameworks include Hibernate, JPA (Java Persistence API), and Entity Framework.
Q10. What are SOLID principles
SOLID principles are a set of five design principles in object-oriented programming to make software more maintainable, flexible, and understandable.
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 functionalit...read more
Q11. What are ACID properties
ACID properties are a set of properties that guarantee the reliability of database transactions.
ACID stands for Atomicity, Consistency, Isolation, and Durability.
Atomicity ensures that either all operations in a transaction are completed successfully or none of them are.
Consistency ensures that the database remains in a consistent state before and after the transaction.
Isolation ensures that the concurrent execution of transactions does not interfere with each other.
Durabilit...read more
Top HR Questions asked in Fxonet
Top Java Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month