Solution Review: Access Modifiers
Let's look at the solution to the Access Modifiers challenge.
We'll cover the following...
We'll cover the following...
Solution
Explanation
- Line 2: We write the
Userclass with the$firstNameprivate property. - Line 5: We add the public setter method