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

4.5 Static and toString — toString

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

Fill in toString so that it returns the point written as (x, y).

Notice main prints the object itself — System.out.println(p) — and Java automatically calls toString. The program prints (3, 4).

Your solution