Task 2 of 7 · 0 solved · 7 to go0%
You can read the problem, but answers are checked only for signed-in students. Sign in to answer →

4.4 Encapsulation — a getter

Total: 0 / 3 pts
Practice mode — check each part and get hints as you go.
Task

The field name is private, so main cannot read it directly. Fill in the getter getName so that it returns the field.

The program prints Ada.

Your solution