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.2 Constructors — Point constructor

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

Write a constructor for Point that takes two numbers and stores them in the fields x and y.

main already builds a point with new Point(3, 4); the program then prints 3 4.

Your solution