Theo Adv Java
Theo Adv Java
What are the SOLID principles, and why are they important in software
design?
2. How do the SOLID principles promote maintainability and scalability in
object-oriented programming?
3. Define the Single Responsibility Principle (SRP) and explain its
importance in object-oriented design.
4. What is the Open/Closed Principle? Explain how it is applied in Java.
5. Define the Liskov Substitution Principle and explain its role in
inheritance.
6. What is the Interface Segregation Principle, and how does it relate to
interface design in Java?
7. What is the Dependency Inversion Principle, and how does it differ from
dependency injection?
8. How can SOLID principles be used together to improve the design of a
large Java project?
1. What is the purpose of @Entity and @Table annotations in Spring Boot JPA?
2. What is the difference between @Embedded and @Embeddable annotations?
Explain with an example.
3. How does the @OneToOne relationship work in JPA, and when should you use
it?
4. What is CascadeType in JPA, and what are some common cascade types
available?
5. Explain the difference between FetchType.LAZY and FetchType.EAGER with
examples.
6. What is the purpose of @JoinColumn, and how does it work in a JPA
relationship?
7. Differentiate between @OneToOne and @OneToMany relationships in JPA.
8. What are the benefits of using an embedded class in an entity?
9. How does JPA handle cascading operations on child entities when
CascadeType.ALL is used?
10. When would you use @OneToOne, @OneToMany, @ManyToOne, @ManyToMany in a
real-world project? Provide an example.