New course! Every coder should learn Generative AI!
Try a free lesson+ 1
Why do we need main() function?
2 Answers
+ 2
the main function only run when you execute
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().