Why all programming languages have main as a execution
starting point?

Answers were Sorted based on User's Feedback



Why all programming languages have main as a execution starting point?..

Answer / uday kiran divvela

All the languages follows a centralized design patter, that
is they must start program execution from main() method
onwards.
But in java programing language without main() method also
we can execute the programs.

Is This Answer Correct ?    6 Yes 2 No

Why all programming languages have main as a execution starting point?..

Answer / babu

In all programming languages compilation starts from one
specific point and they need it one specific point for
excecution so we have main().

In java we can excute the program without main but we need
a main method for compilation.

Is This Answer Correct ?    1 Yes 1 No

Why all programming languages have main as a execution starting point?..

Answer / srikanth reddy

from main()method where we are creating objects and load the
class and calling methods of that class

Is This Answer Correct ?    0 Yes 0 No

Why all programming languages have main as a execution starting point?..

Answer / balamurugan

in java jvm only understand the class which contain main
method so, jvm understand that main method should be the
starting point in java

in other cases compiler need starting point in every
program to execute a program sync to execute so we need
main method for every program

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More Core Java Interview Questions

java program that takes a 3 digit number n and finds out whether the number 2^n + 1 is prime, or if it is not prime find out its factors.

7 Answers   HCL, Wipro,


Does java allow overriding static methods ?

0 Answers  


What is protected access modifier?

0 Answers  


What does null mean in java?

0 Answers  


After compilation of java program we'll get .class code. If it's generated in OS Windows XP will it work on OS Linux? If yes why? If no why?

5 Answers   Aricent,


What is means by DLL file means ? What is the use of DLL file? What are the contents of DLL file?

4 Answers  


How can we make string upper case or lower case?

0 Answers  


What are exceptions

0 Answers   Futures First,


Why char array is favored over string for the storage of passwords?

0 Answers  


What is this () in java?

0 Answers  


What is native method in java?

0 Answers  


What is the difference between an inner class and a sub-class?

0 Answers  


Categories