Spring MCQ

Spring MCQ

  • Sharad Jaiswal
  • 22nd Nov, 2021

We have listed here the best Spring MCQ Questions for your basic knowledge of Spring. This Spring MCQ Test contains 20+ Spring Multiple Choice Questions. You have to select the right answer to every question to check your final preparation for the Spring MCQ Interview or Exams.

Practice Best Spring MCQ Questions;

1) Spring was developed by .............

  • A. Microsoft Software
  • B.Redhat Software
  • C.Pivotal Software
  • D.Apache

2) What is Spring Beans?

  • A. Class
  • B.Object
  • C.List
  • D.Comment

3) What is the scope of stateless bean in spring?

  • A. Singleton
  • B.Prototype
  • C.scope
  • D.None of the above

4) DAO methods require access to the session factory are

  • A. constructor argument
  • B.setter method
  • C.persistence
  • D.Both A & B

5) An alternative to Spring HibernateTemplate is_________

  • A. Repository
  • B.HibernateContext
  • C.Exception
  • D.Hibernate contextual sessions

6) Which tag is also allowed by static field?

  • A. set
  • B.list
  • C.util:constant
  • D.constructor-args

7) Which method is used to gracefully shutdown all the bean processes after closing the spring container?

  • A. getBean
  • B.shutdownHook
  • C.StorageConfig
  • D.None of the above

8) Which interface defines methods for resolving text messages?

  • A. TextEvent
  • B.ContextListener
  • C.MessageSource
  • D.publishEvent

9) Which method used to process bean before initialization callback?

  • A. it’s own constructor
  • B.postProcessAfterInitialization()
  • C.postProcessBeforeInitialization()
  • D.None of the above

10) Which Method used to process bean after initialization callback?

  • A. postProcessAfterInitialization()
  • B.getBean
  • C.it’s own constructor
  • D.postProcessBeforeInitialization()

11) Spring Method that allows you to start a new transaction is called are:

  • A. commit()
  • B.rollback()
  • C.getTransaction()
  • D.None of the above

12) Which is the correct implementation class of BeanFactory?

  • A. ClassPathBeanFactory
  • B.FileSystemBeanFactory
  • C.XmlBeanFactory
  • D.AdvancedBeanFactory

13) What is the basic concept of Spring?

  • A. Factory pattern
  • B.Abstract factory pattern
  • C.Dependency injection
  • D.Singleton pattern

14) How does spring achieve DI or IOC?

  • A. Factory pattern
  • B.Service locator pattern
  • C.Abstract factory pattern
  • D.Singleton pattern

15) The act of creating associations between different componenet of application is known as:

  • A. wiring
  • B.framing
  • C.integrating
  • D.collaborating

16) What is the correct syntax for annotation wiring?

  • A. <annotation-context-config /> to bean configuration.
  • B.<context:annotation-config/> to bean configuration.
  • C.<annotation-config /> to bean configuration.
  • D.<annotation-context:config /> to bean configuration.

17) The spring used in mechanical toys is

  • A. Helical spring
  • B.Leaf spring
  • C.Spiral spring
  • D.Both A & B

18) The spring index (C) is

  • A. wire diameter / mean coil diameter
  • B.wire diameter x mean coil diameter
  • C.mean coil diameter / wire diameter
  • D.Both A & B

19) Helical torsion spring is used in

  • A. door closers
  • B.door hinges
  • C.automobile starters
  • D.All of the above

20) The leaves of multi-leaf springs are subjected to

  • A. bending stress
  • B.axial stress
  • C.shear stress
  • D.None of the above

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.

Related MCQ/Quiz

01st
Jul
Sql Server MCQ
01st
Mar
JDBC MCQ