Filter interviews by
I applied via Company Website and was interviewed before Nov 2023. There were 3 interview rounds.
Rest based endpoints was required to be created for some scenario
posted on 7 May 2024
I applied via Naukri.com and was interviewed in Apr 2024. There were 2 interview rounds.
Builder/Factory Pattern is used to create objects with complex initialization logic.
Builder Pattern separates the construction of a complex object from its representation.
Factory Pattern creates objects without specifying the exact class of object that will be created.
Builder Pattern is often used to create immutable objects with many optional parameters.
Factory Pattern is used when there is a need to create multiple i...
Redux is used in React to manage the application state in a predictable way.
Centralized state management for React applications
Predictable state changes with actions and reducers
Easier debugging and testing of state changes
Facilitates communication between components
Filter a List using Streams in Java
Use the filter() method to apply a predicate to each element in the stream
Use collect() method to convert the stream back to a List
Example: List
Creating an Entity Class in Java
Define class with @Entity annotation
Add @Id annotation for primary key
Include fields with appropriate data types
There are three types of autowiring in Spring: byType, byName, and constructor.
byType: Spring looks for a bean of the same type and injects it.
byName: Spring looks for a bean with the same name and injects it.
constructor: Spring looks for a constructor and injects the arguments.
Lazy fetch loads data only when needed, while eager fetch loads all related data upfront.
Lazy fetch is more efficient for performance as it only loads data when required.
Eager fetch can lead to performance issues by loading unnecessary data upfront.
Lazy fetch is the default behavior in JPA, while eager fetch needs to be explicitly specified.
Example: Lazy fetch can be used for loading a list of items in a shopping cart ...
Transaction management in Hibernate ensures ACID properties for database operations.
Hibernate provides built-in transaction management support through Session interface.
Transactions can be managed programmatically using beginTransaction(), commit(), and rollback() methods.
Hibernate also supports declarative transaction management using annotations like @Transactional.
Transactions in Hibernate ensure Atomicity, Consiste...
Attached entities are actively managed by the persistence context, while detached entities are no longer actively managed.
Attached entities are being managed by the persistence context and any changes made to them will be automatically synchronized with the database.
Detached entities are not being managed by the persistence context and changes made to them will not be automatically synchronized with the database.
Entiti...
Creating two beans in Java using Spring framework
Use @Component annotation to define a bean
Specify the bean name using @Component("beanName")
Use @Autowired annotation to inject one bean into another
Sort an Employee HashMap based on keys or values
Use TreeMap to automatically sort by keys
Use Comparator to sort by values
Convert HashMap to List and then sort
NAAAAAAAAAAAAAAAAAAAAa
Transactional annotation in Spring is used to define the scope of a transaction.
Transactional annotation is used to mark a method or a class as transactional.
It ensures that all the operations within the annotated method or class are executed within a single transaction.
If an exception occurs, the transaction is rolled back.
Transactional annotation can be applied at the method level or class level.
It provides various a...
Cache in Spring is a mechanism to store frequently accessed data in memory for faster retrieval.
Cache improves application performance by reducing the load on the database.
Spring provides caching support through annotations like @Cacheable, @CachePut, and @CacheEvict.
Caches can be configured with different eviction policies, such as LRU or FIFO.
Example: @Cacheable annotation can be used to cache the result of a method
I applied via Recruitment Consulltant and was interviewed before Mar 2023. There were 3 interview rounds.
30 Technical MCQs, 1 medium level code
HDFC Bank
ICICI Bank
State Bank of India
Axis Bank