0
Why this code not running pls
package csc; public class Main { public static void main(String[] args) { System.out.println("Hello-World"); } }
2 Antworten
+ 1
Sololearn code playground has no idea about what "package csc;" is that's why it throwing an error.
Read about java package.
0
Warning: File ./Main.class does not contain class Main
Error: Could not find or load main class Main
Caused by: java.lang.NoClassDefFoundError: csc/Main (wrong name: Main)
As you can see by your error, you're trying to access a package that doesn't exist on their server. Remove that line and you'll be fine.