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 boolean data type in java?

785


What is double in java?

752


Why doesn't the java library use a randomized version of quicksort?

771


What is finally in Java?

833


What is thread safe singleton?

750


What is a wrapper method?

791


Why string is called as immutable?

736


What language is an assembler written in?

792


Which object oriented concept is achieved by using overloading and overriding?

838


What are the differences between forwarding () method and sendredirect() methods?

857


Can an arraylist be empty?

811


what is the difference between future and callable interface in java?

897


What is the best way to findout the time/memory consuming process?

810


What is main in java?

818


what is mutual exclusion? How can you take care of mutual exclusion using java threads? : Java thread

923