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 trialDaniel Springer
7,600 Pointspotential bug in jshell, unsure
Hey everyone was working through the hangman project in java and when I was following along i noticed that in jshell when I tried to compile the program I would keep receiving an error in Game.java for illegal start of expression private String answer; After looking through my code the only difference I could make out between how I did it and the instructor was that I had my brackets indented differently. When I changed the brackets to match the instructors the code would compile fine. Having said this I was under the impression that as long as the variables and methods were within the correct field than it didn't matter how you indented the brackets. If anyone can tell me what I am missing here Id appreciate it.
to be clear the only difference was that the instructor has his file begin like this
class Game{ coding gobbledygook;
}
while I had my setup start like this
class Game { coding gobbledygook; }