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 is string and its types?

609


What is final class?

570


What is type conversion in java?

574


How do you make a thread in java?

628


Can we use return in constructor?

489






does java support pointers?

558


What restrictions are placed on method overloading?

601


When a thread is executing synchronized methods , then is it possible to execute other synchronized methods simultaneously by other threads?

565


What is the syntax and characteristics of a lambda expression? Explain

537


What is dot operator?

572


What is a short in java?

496


What is the console in java?

674


What does you mean in math?

535


What is a private class in java?

506


What is static keyword in java?

547