Parsons problem: Point constructor
Below are candidate lines for a Point class's constructor, which takes parameters px and py and should store them in fields x and y. Arrange the correct lines — the order between the two assignments doesn't matter, but the distractors don't belong.
public Point(int px, int py) { // arrange lines here}
1. Arrange the constructor body.
Click a placed item to send it back. With drag-and-drop enabled, you can also drag items to reorder them — indent arrows always stay click-only.
Click these, in order, if they belong in the answer
Your answer, in order
Your score for your class is recorded when you click Submit all — checking individual questions doesn't save it. You can submit again to improve your score; your best one counts.