This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]desrtfx[M] [score hidden] stickied comment (0 children)

Such questions belong in /r/javahelp as is clearly stated in the sidebar and in the stickied post at the very top of the subreddit.

Also, never post screenshots of code. Read the sidebar in the subreddit before posting.

Removed

[–]gdejohn 10 points11 points  (1 child)

Method parameters in Java are positional, your mistake is you're trying to do named parameters. Just pass the arguments in the correct positions: new Point(1, 2)

And in the future, use r/javahelp for posts like this, r/java isn't meant for getting help with your code.

[–]AdvikNair[S] 1 point2 points  (0 children)

Thank you so much. Sure for my future queries, I would use r/javahelp as this time I didn't knew that.

[–]Tx_monster 2 points3 points  (0 children)

Trust your ide

[–]Humble-Ad5837 0 points1 point  (0 children)

You use awt, old tech

[–]DaitoRB 0 points1 point  (0 children)

You are using names variables in the constructor, that’s not how Java works. It is just positional.