in a console we r giving java <class name> if r pressing
enter where it'll goes

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the types of inner classes (non-static nested class) used in java?

815


What is scope & storage allocation of static, local and register variables? Explain with an example.

807


What is parsing in java?

724


What is runtime locatable code?

1125


What is the difference between a method and a procedure?

770


Differentiate between run time error and syntax error.

826


What are the advantages of compiled language?

822


What is the escape character in java?

736


Describe the various concepts related to object oriented programming (oop).

814


List out benefits of object oriented programming language?

673


What is the use of put method?

737


How do you find the absolute value?

796


What is object-oriented programming?

802


What is identifier give example?

790


Is multiple inheritance supported by java?

708