Java help, variable not working

Hi guys, been trying one of the Java exercises and I just cant get the variable to work. I have no idea why, I have followed the instructions.

And i get this result;

The page displays: Why you do dis java?

  • textToDisplay +

It does not recognize that i have set “textToDisplay” as “hi” and it also will not loop

Any ideas what may be happening here?

2 Likes

try it by putting + textToDisplay + outside the quotes

6 Likes

Amazing, it worked. Thanks for the help!

3 Likes

Great Men Java is the best!

1 Like

Thank you for helping out. We appreciate it. :slight_smile:

4 Likes