in a console we r giving java <class name> if r pressing
enter where it'll goes
Answers were Sorted based on User's Feedback
Answer / srujan jack
it transfers the class name to JVM then the JVM calls main() method using class name.
there fore the main() method must be declared with public & static.....
| Is This Answer Correct ? | 2 Yes | 0 No |
Adapter classes?
What is function declaration?
Why is the main method static?
What is an array in java?
What is a arraylist in java?
how can be object class inherited to all class in a program when java does not support multiple inheritance??
What is a function in programming?
Can we override the static method?
How is string stored in java?
Which sorting algorithm is best in java?
difference throws and throw in java
What are different types of encoding?