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:
- you have to compile before executing, if you don’t compile you’ll get the find/load main class issue
- while (true); should be while (true) { instead I guess
- if (playerAnswer == “Y”) will not work as you intend it to work, you should use equalsIgnoreCase method instead
- what’s the connection with CG ?
Thanks! I didn’t notice the while bracket was gone
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
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