+ 1

Can we use another name in place of main?

20th Aug 2017, 11:35 AM
Prashant Mishra
Prashant Mishra - avatar
2 Answers
+ 19
No, we can't. "Main" is required.
20th Aug 2017, 11:38 AM
Igor Makarsky
Igor Makarsky - avatar
+ 6
Sadly, no. "main" is how java know which part of your program to start on and without the main(string args[]){...} method java just simply doesn't know which of the many methids you (might) have on the particular class file you decided to exexctue.
20th Aug 2017, 11:38 AM
Will