logo

CuriousTab

CuriousTab

Discussion


Home Interview Technology Comments

  • Question
  • Why is the main() method declared static?


  • Correct Answer
  • main() method is called by the JVM even before the instantiation of the class, hence it is declared as static 


  • Technology problems


    Search Results


    • 1. Are arrays primitive data types?
    • Discuss
    • 2. Does Java support multiple inheritance?
    • Discuss
    • 3. What are instance variables?
    • Discuss
    • 4. What do you mean by platform independence?
    • Discuss
    • 5. What is the difference between a JDK and a JVM?
    • Discuss
    • 6. What is the return type of the main() method?
    • Discuss
    • 7. What is the argument of main() method?
    • Discuss
    • 8. Can a main() method be declared final?
    • Discuss
    • 9. Does the order of public and static declaration matter in main() method?
    • Discuss
    • 10. Can a source file contain more than one class declaration?
    • Discuss


    Comments

    There are no comments.

Enter a new Comment