main() conventions | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

main() conventions

Hi guys, I suppose that even though it is possible to have multiple main methods, there should be only one. are there any conventions where to put the main method inside your project? thanks

22nd Dec 2017, 5:19 AM
olndirty.
olndirty. - avatar
1 Answer
+ 4
I usually create a Main class and place the main() method within this class, but I don't believe there is an actual convention for where you place your main method. This is just a standard practice, at least for me.
22nd Dec 2017, 5:37 AM
ChaoticDawg
ChaoticDawg - avatar