Public Group

# Cannot Find Symbol constructor?

This topic is 2753 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I keep getting this error at line 29. I'm basing this off of my professors code and modifying it to suit my needs but my professor has the same thing going on and I can't seem to find why it's not working.... so I need some help.

http://pastebin.com/sWxfic1z

##### Share on other sites
Hi! I think you are getting that error because of the way you define your constructor:

public void Coordinates2D(int dimension)

Constructors don't have return types. So the correct way of defining the constructor of the Coordinates2D class would be:

public Coordinates2D(int dimension)

Hope it helps

##### Share on other sites

Hi! I think you are getting that error because of the way you define your constructor:

public void Coordinates2D(int dimension)

Constructors don't have return types. So the correct way of defining the constructor of the Coordinates2D class would be:

public Coordinates2D(int dimension)

Hope it helps

THANKS! It worked! Now it's working ... rather compiles I"m still not done. But I like to compile every so often to make sure that they are no erros. easier to one one by one then all at once. IMO. But thanks!

##### Share on other sites
... Why would you call the class "Coordinates2D" if it apparently represents coordinates for any number of dimensions?

##### Share on other sites

... Why would you call the class "Coordinates2D" if it apparently represents coordinates for any number of dimensions?

1. 1
2. 2
3. 3
Rutin
21
4. 4
frob
18
5. 5

• 33
• 13
• 10
• 10
• 12
• ### Forum Statistics

• Total Topics
632568
• Total Posts
3007119

×