When i copy paste my code from the code academy coding window it wont run in any other java IDE

When i copy paste my code from the code academy coding window it wont run in any other java IDE. i tried at https://www.compilejava.net/ and in eclipse and it gives me the error messeges

“Successfully compiled /tmp/java_8NpMdZ/undefined.java”
“Error: Could not find or load main class undefined”

Anyone know what i am doing wrong?

Kind regards
Tckk

1 Like

You named your file undefined. Look at the error message, it therefore tried to find the class named undefined.
What if you therefore named the file to match your class instead?

1 Like