| |||||||||
The function main() in programming languages such as C++ and Java serves as the starting point of a program compiled in those languages. It is the first function run when such a program starts, and usually organises the rest of the functionality of the program.