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

Quiz: SOLID Principles · Question 9 of 10

Which statement about DRY is correct?

Which statement about DRY is correct?

  1. A.Each piece of knowledge, such as a tax rate, should be defined in one place
  2. B.Never write two functions with the same number of lines
  3. C.Copy code instead of calling functions, to avoid coupling
  4. D.DRY means writing no comments
Answer & explanation

Correct answer: Each piece of knowledge, such as a tax rate, should be defined in one place

If the rate changes, only one place needs editing.

Can you get the rest right without peeking?

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

Start the quiz →