Question: What is an advantage of an immutable object?

  1. Immutable objects use less memory than their mutable counterparts.
  2. Immutable objects do not require error handling.
  3. Immutable objects can be used in classes, mutable objects cannot.
  4. Immutable objects are threadsafe.

Answer: The correct answer of the above question is Option D:Immutable objects are threadsafe.