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 Creating the MVP Current Progress

Magdalena Frankowska
Magdalena Frankowska
15,501 Points

Hangman - getCurrentProgress()

Can anyone tell me what the getCurrentProgress() does ? He just writes it out of thin air and I can't connect it to anything.

2 Answers

Hi there,

From memory (which is a dangerous thing to rely on!!) the getCurrentProgress() method displays how well you are doing at guessing the whole string. So, it inserts letters where you've correctly guessed and a dash where you haven't got the letter yet:

--------- // no correct guesses
T-EE----E // guessed T & E

I hope that helps,

Steve.

No problem! :+1: :smile: