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 (Retired) Creating the MVP Storing Guesses

Error after i log into the repl

Hello everybody,

I having some issues with the repl.I start the repl fine i enter the string variable "Hello" as Craig done,but when i try to apply index0f('e')..to see how many 'e' we have into the string ..it shows :

java> String example = "Hello";
java.lang.String example = "Hello"
java> example.index0f('e');
ERROR: cannot find symbol
symbol: method index0f(char)
location: variable example of type java.lang.String

Can anyone tell me what i do wrong? Thank you in advance!

2 Answers

Rob Bridges
.a{fill-rule:evenodd;}techdegree seal-36
Rob Bridges
Full Stack JavaScript Techdegree Graduate 35,467 Points

Hey there Alina,

Your code is fine and should work.. however when looking at the capital O looks like a little off, are you by any chance putting a zero in it's place?

That's the only thing I can think of.

Thanks let me know if this doesn't fix it.

Hey Rob,

Thank you very much for your answer.Indeed i was putting 0(zero)..cause i was thinking that Craig use 0 too.Thank you very much for the tip !!

Have a great day!!