Changing Main Method Class Name
Is there a reason we can't change the main method class name? I really want to use this for my classroom but I am unable to teach them proper class naming scheme until we get to the AP Level where they start creating classes. I feel like this shouldn't be so hard on the back end... A simple, "Not going to happen" will suffice.
Are you talking about the method itself or the class name? If you mean the method, then that would go against the language's standards for how a program should be structured. If you mean the entry-point class, then that's something that could possibly be done. I'm currently in AP Computer Science A using Java, and I've just dealt with using this as my Main.java file for the entire year.
If you feel like this is an extremely important feature, try giving it a stab over on the Feedback page.
I would also like to have the ability to rename Main.
I did try deleting the contents of Main.java, then creating my own .java file with a main() method and a class/file name of my choosing, and it appears to work. Still, I don't really want to put students through that.
You can use the mv command in the terminal
mv Main.java Pizza.java, Will rename Main.java to Pizza.java.
@DanLam13 thank you! This actually worked for me. I tried to run the code again but received an error message, and remembered that I had to run javac NewClassName.java and then afterwards, it ran perfectly! Thanks again.