Java

Moderators: zibadian
Number of threads: 7836
Number of posts: 18235

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
why does program execution start from main? Posted by bits on 21 Jun 2005 at 9:35 AM
plz can anyone answer this was asked at a viva .......
i just wanna know why is it cause the langauge intrpreter is designed tht way or something else.??????help me out plz

Report
Re: why does program execution start from main? Posted by Zarjay on 27 Jun 2005 at 9:40 PM
: plz can anyone answer this was asked at a viva .......
: i just wanna know why is it cause the langauge intrpreter is designed tht way or something else.??????help me out plz
:
:

The compiler was designed to recognize main as the entry point in a program. It started that way with C, and C compilers were just built that way. It's the same way with C++ and Java just because of habit, consistency, standards, etc.

In the same way lines of text are called strings and whole numbers are called ints and decimal point numbers are called doubles or floats, main was simply decided to be the main point of entry for Java.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.