Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Main function in java?

Tags:

java

Actually , I have 2 questions . The first is Why there should be a main function in a project and the second If I can have more than one main function in a single project and If that would be useful ?

like image 453
Ahmed Avatar asked Dec 29 '22 06:12

Ahmed


1 Answers

Main function serves as a bootstrapping point of your application, a starting point where the execution begins. Every class in your project can have a main method.

like image 190
Boris Pavlović Avatar answered Jan 11 '23 19:01

Boris Pavlović