"Compiler Exit Status 1"
Ok , u did what Six and Coder said. Just so you know, there can only be 1 public static void main(String[] args)
. If you wanna fix this, change the public static void main(String[] args)
in SammysMotto2
to public SammysMotto2
Have you tried:
Main.java
class Main { public static void main(String[] args) { SammysMotto2.main(); } }
and then for SammysMotto2.java
:
class SammysMotto2 { public static void main() { System.out.println("SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS"); System.out.println("S Sammy's makes it fun in the sun S"); System.out.println("SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS"); } }
@Coder100 I have tried your ideas, but I still get the same error. maybe you can try to explain what my error means?
@NoahJospeh why are you not calling it as main
? SammysMotto2
is a class, and it's a static class so that means there is no constructor. You are going to have to, in your code, have: SammysMotto2.main();
instead
it appears you didn't change anything too btw @NoahJospeh
Replace Line 3 of Main.java to SammysMotto2.main(args);
@SixBeeps I did what you said, but I still have the same error, am I doing it wrong?
Thank you, everyone, I fixed it, and it now works!