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 Scrabble Tiles

ScrabblePlayerCode in JavaObjects

I'm stuck!!

1 Answer

Rares Conea
PLUS
Rares Conea
Courses Plus Student 15,000 Points

Hi,

alt text

At task 1 you were required to add the tile which is a char to the String that holds the "tiles"(char). You do this in addTile();

At task 2 you should find if you have the tile passed as a parameter in hasTile(). You do this by looking for the index of the first appearence of that tile(char) in the Stirng tiles. If the tile is not in tiles then indexOf() will return -1.