🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Creational Patterns in Java: all 10 questions

Quiz: Creational Patterns in Java · Question 10 of 10

Which statement about Singletons in Spring Boot applications is correct?

Which statement about Singletons in Spring Boot applications is correct?

  1. A.You must write a private constructor for every service
  2. B.Spring beans are singletons by default, and they are injected, so hand-written Singletons are rarely needed
  3. C.Spring does not allow singleton objects
  4. D.Every request creates a new service object by default
Answer & explanation

Correct answer: Spring beans are singletons by default, and they are injected, so hand-written Singletons are rarely needed

The default bean scope is singleton, and injection keeps classes testable.

Can you get the rest right without peeking?

Take the timed Quiz: Creational Patterns in Java quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →