Examveda
Examveda

The main method should be static for the reason

A. It can be accessed easily by the class loader.

B. It can be accessed by every method or variable without any hindrance.

C. It can be executed without creating any instance of the class.

D. None of the above

Answer: Option C


This Question Belongs to Java Program >> Constructors And Methods

Join The Discussion

Comments ( 2 )

  1. Sumit Kumar
    Sumit Kumar :
    2 years ago

    In the case of the main method, it is invoked by the JVM directly, so it is not possible to call it by instantiating its class. And, it should be loaded into the memory along with the class and be available for execution. Therefore, the main method should be static.

  2. Elly Mangat
    Elly Mangat :
    3 years ago

    Ooo thank u so much veere....nheeriyan dhaa tiyan veere....aggarwaal da phoosa paad ta veere

Related Questions on Constructors and Methods

What is a constructor in Java?

A. A special method to create instances of classes

B. A method used for mathematical calculations

C. A method to perform string manipulations

D. An exception handling mechanism