Online Exam Quiz

questionQuestion  1 to 30

What is HQL in Hibernate?

  • Hibernate Query Language
  • Hibernate Quick Language
  • Hibernate Query Library
  • Hibernate Quick Library
Mark for review

What does the @JoinTable annotation in Hibernate do?

  • Defines a join table for a collection
  • Defines a join column
  • Defines a primary key
  • Defines a secondary key
Mark for review

What is Hibernate?

  • A Java library for graphics
  • A Java framework for object-relational mapping
  • A type of SQL database
  • A web server
Mark for review

What is Bean Factory in Spring?

  • A factory for creating HTTP beans
  • Core container for Spring beans
  • A repository for Spring beans
  • A logging utility
Mark for review

Which annotation is used to indicate a repository in Spring?

  • @Repository
  • @Service
  • @Controller
  • @Component
Mark for review

Which annotation is used for defining a method as a transaction in Spring?

  • @Transactional
  • @Transaction
  • @Transact
  • @TransactionManager
Mark for review

Which of these is not a type of inheritance mapping in Hibernate?

  • Single Table
  • Table Per Class
  • Table Per Subclass
  • Joined Table
Mark for review

Which of these is an advantage of using Spring?

  • High memory consumption
  • Loose coupling
  • Complexity
  • High latency
Mark for review

Which of the following is not a fetching strategy in Hibernate?

  • Lazy
  • Eager
  • Immediate
  • Fetch
Mark for review

Which method is used to delete an object in Hibernate?

  • delete()
  • remove()
  • destroy()
  • drop()
Mark for review

What does the term "aspect" mean in Spring AOP?

  • A feature of the application
  • A module of the application
  • A point of execution in the application
  • A cross-cutting concern
Mark for review

What is the role of @Configuration in Spring?

  • To define a Spring configuration class
  • To define a Spring component
  • To define a Spring bean
  • To define a Spring service
Mark for review

What is SessionFactory in Hibernate?

  • A factory for managing HTTP sessions
  • A factory class for Session objects
  • A logging utility
  • A transaction manager
Mark for review

Which of these is not a valid scope in Spring?

  • Singleton
  • Prototype
  • Request
  • Immediate
Mark for review

Which interface is used for transaction management in Spring?

  • TransactionManager
  • PlatformTransactionManager
  • HibernateTransactionManager
  • JdbcTransactionManager
Mark for review

Which of these is used to configure a Spring application?

  • applicationContext.xml
  • spring-config.txt
  • spring.properties
  • config.spring
Mark for review

Which of the following is a Hibernate dialect for MySQL?

  • org.hibernate.dialect.MySQLDialect
  • org.hibernate.dialect.SQLServerDialect
  • org.hibernate.dialect.OracleDialect
  • org.hibernate.dialect.PostgreSQLDialect
Mark for review

Which annotation is used to handle exceptions in Spring MVC?

  • @ExceptionHandler
  • @ErrorHandler
  • @Catch
  • @ControllerAdvice
Mark for review

What is the primary purpose of Hibernate?

  • To manage Java threads
  • To provide caching
  • To map Java objects to database tables
  • To handle HTTP requests
Mark for review

What is Spring?

  • A framework for developing Java applications
  • A database management system
  • A programming language
  • An operating system
Mark for review

What is the default scope of a Spring bean?

  • Singleton
  • Prototype
  • Request
  • Session
Mark for review

Which is a correct statement about Spring Boot?

  • It is a replacement for Spring Framework
  • It simplifies the development of Spring applications
  • It does not support REST APIs
  • It is only used for web applications
Mark for review

Which annotation is used for dependency injection in Spring?

  • @Autowired
  • @Injected
  • @Required
  • @Mandatory
Mark for review

Which of the following is not a core module in Spring?

  • Spring MVC
  • Spring ORM
  • Spring DAO
  • Spring SDK
Mark for review

What is the purpose of the ORM module in Spring?

  • Managing database connections
  • Handling web requests
  • Integrating with Hibernate and JPA
  • Providing security features
Mark for review

Which annotation is used to inject dependencies in Spring?

  • @Autowired
  • @Resource
  • @Inject
  • All of the above
Mark for review

Which method is used to save an object in Hibernate?

  • persist()
  • save()
  • insert()
  • store()
Mark for review

What is the use of @JoinColumn annotation in Hibernate?

  • To specify the primary key column
  • To specify the foreign key column
  • To specify a unique constraint
  • To specify a composite key
Mark for review

What does the @Transactional annotation do in Spring?

  • Manages transactions automatically
  • Logs transaction details
  • Sends transaction alerts
  • None of the above
Mark for review

What is the default transaction management type in Spring?

  • Programmatic
  • Declarative
  • Hybrid
  • Manual
Mark for review

blinkerOnline

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • Answered
  • Not Answered
  • Marked for Review