I am involved in creating custom classes and cannot figure out where I made a mistake.
From the main class ...
MyPoint p1 = new MyPoint(317, 10);
the error says:
constructor MyPoint in class MyPoint cannot be applied to given types;
required: no arguments
found: int, int
reason: actual and formal argument lists differ in length
this is from my MyPoint class:
private int x, y;
public void MyPoint(int x, int y)
{
this.x = x;
this.y = y;
}
Why is MyPoint (317, 10) not served in the appropriate class along with x and y?
Any help would be appreciated, thanks.
source
share