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

Tile Counter

so first off i'm having issues with the "ask a Question tab" it won't allow me to ask a question.

Second, I'm on the getTileCount Challenge and again I have no errors, however it will not allow me to pass.

This is the code i'm writing......

public String getTileCount(){ String progress = " " ; for (char tile : mHand.toCharArray()) { char display = '-'; if (mHand.indexOf(tile) >=0) { display = tile; } mHand += display; } return progress; } }

1 Answer

It seems that "return progress" is also in that for-loop. You should set it right after the for-loop. Ignore me if im wrong :)