Home / CSE MCQs / Spring MCQs :: Spring Introduction Spring, Advanced Spring

CSE MCQs :: Spring MCQs

  1. Which method is used to gracefully shutdown all the bean processes after closing the spring container?
  2. A.
    shutdownHook
    B.
    destory method
    C.
    none of the mentioned
    D.
    all of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. Which one is the default scope of the beans?
  4. A.
    Prototype
    B.
    Session
    C.
    Request
    D.
    Singleton

    View Answer

    Workspace

    Discuss Discuss in Forum


  5. Which attribute is used to specify classname of the bean?
  6. A.
    name
    B.
    id
    C.
    class
    D.
    constructor-args

    View Answer

    Workspace

    Discuss Discuss in Forum


  7. Declaring bean form object properties can be done using:-
  8. A.
    PropertyPathFactoryBean
    B.
    util:constant
    C.
    None of the mentioned
    D.
    All of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  9. What are the ways to create custom Property Editors?
  10. A.
    implement PropertyEditor interface
    B.
    extend PropertyEditorSupport Class
    C.
    none of the mentioned
    D.
    all of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  11. Which package is used for periodic work
  12. A.
    java.lang.Thread
    B.
    java.util.TimerTask
    C.
    java.util.Timer
    D.
    java.util.concurrent

    View Answer

    Workspace

    Discuss Discuss in Forum


  13. Method used to process bean before initialization callback
  14. A.
    scope
    B.
    postProcessAfterInitialization()
    C.
    postProcessBeforeInitialization()
    D.
    it's own constructor

    View Answer

    Workspace

    Discuss Discuss in Forum


  15. Which attribute is used to set the scope of the bean?
  16. A.
    setScope
    B.
    scope
    C.
    getScope
    D.
    none of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  17. Which attribute is used to specify classname of the bean?
  18. A.
    name
    B.
    id
    C.
    class
    D.
    constructor-args

    View Answer

    Workspace

    Discuss Discuss in Forum


  19. Which tag is also allowed by static field?
  20. A.
    util:constant
    B.
    list
    C.
    set
    D.
    constructor-args

    View Answer

    Workspace

    Discuss Discuss in Forum