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 trialNathan Sass
3,507 Points"ERROR: cannot find symbol" when trying to initialize a new instance of PezDispenser in the repl
I tried re compiling my file to see if I had a syntax error but it was fine. It just doesnt seem to work in the repl.
3 Answers
Ken Alger
Treehouse TeacherNathan;
Can you post your code and your error message, please?
Thanks,
Ken
Andrew Wiley
27,097 PointsMake sure you are adding the : before the load like this " :load PezDispenser.java "
Anne Krarup
2,686 PointsAs Nathan said, the issue is the comments. I had the exact same problem, and it was solved when I removed the comments.
typetypetypetype
Courses Plus Student 1,033 PointsAs Nathan and Anne said, if you have comments you're going to get an error ""ERROR: cannot find symbol" if you have comments in your code.
That's just shoddy coding on Treehouse's part TBH. I have notes because this section is pretty brutal to new coders so losing them isn't cool :)
Nathan Sass
3,507 PointsNathan Sass
3,507 PointsI was able to get it working when I removed the comments in my code. For some reason, the repl does not work when there are comments in the code. Any idea why?