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!

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 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!