Online Exam Quiz

questionQuestion  1 to 30

Which of these is not a valid state of a Hibernate object?

  • Transient
  • Persistent
  • Detached
  • Null
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 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

What is the use of the @Entity annotation in Hibernate?

  • Defines a class as an entity
  • Maps a class to a database entity
  • Identifies a method as transactional
  • Specifies a primary key
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 of these is not a type of inheritance mapping in Hibernate?

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

What is the purpose of the Criteria API in Hibernate?

  • To perform SQL operations
  • To create database schemas
  • To retrieve entities based on specific criteria
  • To manage transactions
Mark for review

Which annotation is used to define a Spring bean?

  • @Bean
  • @Autowired
  • @Component
  • @Service
Mark for review

Which of these is not a feature of Hibernate?

  • Automatic table creation
  • Lazy loading
  • Caching
  • HTTP session management
Mark for review

Which annotation is used to inject dependencies in Spring?

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

What is the purpose of the @Entity annotation in Hibernate?

  • Defines a class as an entity
  • Maps a class to a database entity
  • Identifies a method as transactional
  • Specifies a primary key
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 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

Which annotation is used to indicate a repository in Spring?

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

Which method is used to save an object in Hibernate?

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

What does the @Table annotation in Hibernate do?

  • Maps a class to a database table
  • Maps a method to a table operation
  • Maps a package to a table schema
  • Maps a variable to a table column
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

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 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 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 role of the DispatcherServlet in Spring MVC?

  • Handling database operations
  • Managing transactions
  • Front controller to handle all requests
  • Initializing beans
Mark for review

Which method is used to begin a transaction in Hibernate?

  • begin()
  • start()
  • open()
  • beginTransaction()
Mark for review

Which of these is used to define a primary key in Hibernate?

  • @Primary
  • @Key
  • @Id
  • @PrimaryKey
Mark for review

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

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

Which annotation is used for dependency injection in Spring?

  • @Autowired
  • @Injected
  • @Required
  • @Mandatory
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 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 of the following is true about Spring Boot?

  • It is slower than traditional Spring applications
  • It requires XML configuration
  • It provides embedded server support
  • It does not support microservices
Mark for review

What does the Spring @Component annotation do?

  • Defines a class as a Spring component
  • Defines a method as a Spring component
  • Defines a variable as a Spring component
  • Defines a package as a Spring component
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