I'm working on a fairly basic program and can not seem to get it to work. I've checked my spelling and all that; the only thing I can think of is my main isn't able to find my class file.
Here's the error message:
ComplexDemo.java:10: cannot find symbol
symbol : constructor Complex(double,double)
location: class Complex
Complex a=new Complex(9.9, 7.7);
^
And the constructor in the class file:
public void Complex(double x, double y)
{
real=x;
imaginary=y;
}
When I remove the values it works fine but that sort of defeats the purpose. Any suggestions?
That does work, but I'm more concerned as to why the method I used doesn't. Also, while I'm not positive, I think what I need to do requires initializing with the values. Thank you for the help.
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.