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 trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Sven Hecker](https://secure.gravatar.com/avatar/29c342b904355b9e76bef46a6235fa86?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Sven Hecker
748 PointsCannot find symbol
If i try to run the exact same code as shown in the vid at min 3:32 i got an error saying
com/teamtreehouse/override/Main.java:6: error: cannot find symbol
System.out.println(mycheese);
^
symbol: variable mycheese
location: class Main
1 error
My SDK ist set to "temurin-17" and Compiler output is defined too.
1 Answer
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 PointsAll this error is saying is that there is an attempt to reference "mycheese" but that it has not been declared. To help identify the actual issue, we'd need to see the rest of the code, or you could share a link to a workspace snapshot.
Sven Hecker
748 PointsSven Hecker
748 PointsHi, thank you for your reply. Here is what my Main.java looks like:
and my Cheese.java:
If the problem is a missing reference, why does it work in the video though?
Steven Parker
230,688 PointsSteven Parker
230,688 PointsIt's a spelling issue. The symbol previously declared is "myCheese" (with a capital "C"), but the undefined reference is to "mycheese" (all lower case).
The working code in the video has a reference to "myCheese", spelled the same as it was declared.