Java Programming Help!

I’m trying out my java program in tutorialspoint.com, but it keeps saying it can’t find/load main class. I know it works since I ran the program before and it worked fine. Here is the link to my program.

Hi, you have multiple issues:

  1. you have to compile before executing, if you don’t compile you’ll get the find/load main class issue
  2. while (true); should be while (true) { instead I guess
  3. if (playerAnswer == “Y”) will not work as you intend it to work, you should use equalsIgnoreCase method instead
  4. what’s the connection with CG ? :open_mouth:

Thanks! I didn’t notice the while bracket was gone :stuck_out_tongue:

And you’re right, the playerAnswer == Y didn’t work, I’ll try the equalsIgnoreCase

What do you mean the connection of CG though?

I mean that I don’t see the relation with CG, why you post your question here rather than stackoverflow or something equivalent :wink:

Sorry I didn’t respond earlier, I didn’t get a notice for some reason >^>

Anyway, I didn’t really know what the problem was, and I didn’t want to just post it in some random forum