Spring Data JPA Quiz - MCQ - Multiple Choice Questions
Q. What is Spring Data?
A. A database management systemB. A cloud computing platform
C. An ORM framework for Java applications
D. A dependency injection container
Q. What is the main goal of Spring Data?
A. To provide a simple and consistent API for data accessB. To optimize database performance
C. To replace the need for SQL
D. To integrate with cloud storage systems
Q. Which of the following is NOT a Spring Data module?
A. Spring Data JPAB. Spring Data MongoDB
C. Spring Data Hibernate
D. Spring Data Redis
Q. Which annotation is used to declare a Spring Data repository?
A. @RepositoryB. @Controller
C. @Service
D. @Component
Q. Which query method keyword is used to specify a custom query in Spring Data?
A. @QueryB. @FindBy
C. @CustomQuery
D. @CustomMethod
Q. Which of the following is NOT a valid Spring Data repository method prefix?
A. findByIdB. findByFirstName
C. countByLastName
D. removeByAge
Q. Which of the following is NOT a valid repository method return type in Spring Data?
A. voidB. Iterable
C. List
D. Optional