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

Quiz: Design Patterns · Question 10 of 10

An object has many optional fields, and a constructor with ten parameters is hard to read. Which pattern helps?

An object has many optional fields, and a constructor with ten parameters is hard to read. Which pattern helps?

  1. A.Observer
  2. B.Adapter
  3. C.Builder
  4. D.Strategy
Answer & explanation

Correct answer: Builder

A builder sets the parts one by one, often with chained calls, then builds the object.

Can you get the rest right without peeking?

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

Start the quiz →