LearnFrenzy
Sign in Take a free test

Encapsulation · Encapsulation MCQ · Question 17

A write-only property Answer, explanation & discussion

  • MCQ
  • Medium
  • 0 comments
  • Answer explained
  • Moderated community
Question 17 Back to Exercise

Which is a good example of a write-only property?

  • A A user's name
  • B A password that is stored as a hash and never returned Correct
  • C An order total
  • D A product price
Correct Answer: Option B

Offer setPassword and checkPassword, not getPassword.

Discussion & Comments 0

Share your method, a shortcut, or ask about a step you didn't follow.

No comments yet. Be the first to share your solution!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links