0

ERROR-hello world

I have performed "Hello World" both with and without error. The first time I got an error due to a missing ";" at the end. I fixed that and it worked just fine. However when I tried doing this line again I got a new error that makes NO SENSE TO ME! This is what I got: Error: Could not find or load main class MyClass Caused by: java.lang.NoClassDefFoundError: Myclass (wrong name: MyClass) What causes this? NOTHING CHANGED AND I COPIED THE ORIGINAL TEXT.

25th May 2019, 7:16 PM
Blayle
3 ответов
0
Honestly that's what I thought too. Sadly I closed out the tab in frustration earlier. But I shall try to replicate it.
25th May 2019, 9:02 PM
Blayle
0
I have found the problem I believe anyway.. class MyClass { public static void main(String[ ] args) { System.out.println("Hello World"); } } class Myclass { public static void main(String[ ] args) { System.out.println("Hello World"); } } It looks like instead of MyClass I was typing "Myclass" the one lowercase letter seems to have messed it up. That was the only thing that made it replicate the issue. I tried it a third time and missed a single . between "System" and "out" heh, syntax is everything and same with proofing...I am a COMLPLETE NOOB at this but it is fun. Thank you for taking the time to respond sir.
25th May 2019, 9:08 PM
Blayle