Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Java Java Objects Delivering the MVP Validating and Normalizing User Input

I think we can set guess = Character.toLowerCase(guess) in the charGuess method. This can solve the problem in 1 line.

Don't know what the difference is between my way and the video's way

This is most probably true, but it would be more logical to first check whether the guess is a letter in the first case. If guess = '@', for example, Character.toLowerCase(guess) will result in $1 => '@'. As you see, this was a useless call of the function, though. It would not have been so strange if, calling this function on a non-letter Character like '@', it would give an error. (Luckily?) it doesn't!