0
is a method called main compulsory for java programs?
5 Answers
+ 2
well... not sure what you call compulsory, but it's where you call all your classes, and where you can create objects from your classes.
The Main is where you test all your code!
+ 2
In programming languages with different modules, there exists a starting point named main. It can be called function or a module. It is compulsory and it is the module executed at the very first.
+ 1
Yep. The JVM has to start somewhere in the program, so when it starts running, it searches for the main method and works from there.
+ 1
yes it is necessary for main class of the project
0
There's some kind of Code, you actually don't need to "start" with the main method when writing it. But later in the code it's has to come in to be able to call the object's and classes. So whether it's written in the beginning or not the Main Method has to be present.