Welcome to the CSC Q&A, where you can get help (and share your knowledge) about computer science!

Writing the main method header

+3 votes
When writing the main method header can you substitute any word for the word <main>? Is this just a name you assign the header, similar to how you can assign any name to a static method, or is it apart of the special wording that makes the program work?
asked Aug 24, 2017 in CSC 211 (F17) by Matthew Kuechenberg (100 points)

1 Answer

+2 votes
When you use the "main" keyword for a method, it indicates that the method is the "main method", which Java will automatically run first. So "main" is important and cannot be substituted by any other keywords.
answered Aug 25, 2017 by Minh Ta (100 points)