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

Java Java Objects (Retired) Delivering the MVP Validation

Hi. In Java Objectives, what exactly is "letter"?

I've been working on this over the course of a few weeks and I've forgotten a few things, namely in "letter" in hangman game. I notice it is used everywhere (well it is a hangman game after all) but I never see it being defined in the code. Is it one of java's variables or did I miss it? (I know I could solve this by rewatching older videos but it's just one tiny curiosity.)

Robert Gorski
Robert Gorski
1,532 Points

I think you're seeing it in the methods in the Game.java file. If that's the case, it's defined in the declaration of the method, e.g.,

private char validateGuess(char letter) { 
}

Then letter gets used inside the method.