Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAnxii KJ
5,560 PointsI'm having trouble figuring out one error *Primary constructor body is not allowed* How to fix it?
It's from a lesson, I checked everything and it all seems to be correct but it still gives an error. It's from a Lesson Static Method.
2 Answers
Anxii KJ
5,560 PointsThe problem really was that I forgot to remove ';' that from a line of code that is public int DistanceTo(int x, int y) That was the only reason I was having an error.
Anxii KJ
5,560 PointsIt's all good figured it out myself.
K Cleveland
21,839 PointsYou should update this with your problem and how you solved it. I guarantee someone else will be searching for a problem like this and how to solve it. :)