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

Quiz: Immutability and Value Objects · Question 6 of 10

Which is the best example of a value object?

Which is the best example of a value object?

  1. A.Money(500 rupees)
  2. B.A Student with a student ID
  3. C.A database connection
  4. D.A logged-in user session
Answer & explanation

Correct answer: Money(500 rupees)

Two Money objects of the same amount are interchangeable; a student has an identity.

Can you get the rest right without peeking?

Take the timed Quiz: Immutability and Value Objects quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →