Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to fix this problem I’ve been working on

I’m learning how to code currently on my own before I take a couple classes. Why won’t Point point1= new Point (x: 1, y: 1); work. I get an error when I try to run it in this specific section using IntelliJ

Just need help with that part. Trying to learn the basics.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

What error do you get? What is the programm code for the Point constructor you are calling? What is the Java version you are targeting?

Aside from those obvious questions, one thing jumps out to me immediately:

I do not think that java has named arguments.
Try this instead:

Point point1 = new Point (1, 1)
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading