Why all programming languages have main as a execution
starting point?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 |
is this possible to create an array of 0 length? if so how? if not so why? coz we have an array in main() likw this "static void main(String [] s) then what it signifies?
We have two methods to create methods the threads. 1. Implementing runnable interface 2. Extending to thread class and overriding run method. Among these two which one is better and why? Please explain me in detail.
Why singleton is not thread safe?
What happens if main method is not static?
How do you compare values in java?
How to print nodes of a Binary tree?
Define packages in java?
How many ways can we create the string object?
What is ascii code?
Can we sort a map in java?
What is difference between filereader and bufferedreader?
Can we create our own wrapper class in java?