Add office photos
Employer?
Claim Account for FREE

Deutsche Bank

3.9
based on 3.2k Reviews
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by

10+ Coherent Mining Solutions Interview Questions and Answers

Updated 7 May 2024
Popular Designations

Q1. Write code for Builder/Factory Pattern, basically anything other than Singleton

Ans.

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 instances of a class with similar characteristics.

Add your answer

Q2. Write snippet for creating an Entity Class.

Ans.

Creating an Entity Class in Java

  • Define class with @Entity annotation

  • Add @Id annotation for primary key

  • Include fields with appropriate data types

Add your answer

Q3. Why is Redux used in React

Ans.

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

Add your answer

Q4. Write Snippet to create two beans

Ans.

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

Add your answer
Discover Coherent Mining Solutions interview dos and don'ts from real experiences

Q5. Transaction Management in Hibernate

Ans.

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, Consistency, Isolation, and Durability for database operations.

Add your answer

Q6. Attached Entity vs Detached Entity

Ans.

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.

  • Entities become detached when the persistence context is closed,...read more

Add your answer

Q7. Filter a List using Streams

Ans.

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 names = Arrays.asList("Alice", "Bob", "Charlie"); List filteredNames = names.stream().filter(name -> name.startsWith("A")).collect(Collectors.toList());

Add your answer

Q8. Different Types of Autowiring

Ans.

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.

Add your answer

Q9. Sort an Employee HashMap

Ans.

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

Add your answer

Q10. Lazy vs Eager Fetch

Ans.

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 only when the user views the cart.

  • Example: Eager fetch can...read more

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Java Full Stack Developer Interview Questions from Similar Companies

4.0
 • 12 Interview Questions
View all
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter