|
I think its a keyword the language designer put in the language code or compiler or the linker, the compiler and linker itself are a program after all right?
The main method is given preference over others cuz this method is supposedly the main control, the core control of the program, if there's no core control, things might go unorganized and lead to hectic right?
Upon why it is named the main method or why they use it, well, thats really up to the designer preference in the first place actually, they put the name [b]main[/] to state that this is the core of the program, the main flow where everything works
If i were the designer i might just use core as the keyword, or something else, instead of main
Just a record, Java is a derivation of C++, so its not really that strange if they use main as well as the core control
Bout how it identify the main method, i don't really know, since i don't study the inner programs of C and Java compilers and linkers, but i have seen some webs in the net that dwell on this subject, try googling for it
But from my point of view, I think it would just be the same as identifying any other method, just that this one method is named as main() in C++ or main(String[] args) in Java to tell the compiler, that it should do the flow following this method
|