+ 1

Why do we need main() function?

25th May 2017, 12:23 PM
Harsh Priyadarshi
Harsh Priyadarshi - avatar
3 Answers
+ 2
the main function only run when you execute
25th May 2017, 1:45 PM
MOHANRAJ D
MOHANRAJ D - avatar
0
it is a legacy of C. the loader will start at main() and execute the program to end. perhaps C picked this up from it's predecessors. in Java, the JVM's loader will start at main().
25th May 2017, 1:08 PM
Venkatesh Pitta
Venkatesh Pitta - avatar