best answer > Why is the main method static 2024?- QuesHub | Better Than Quora
  • Why is the main method static 2024?

    方法 静态 这是

    Questioner:Harper Cooper 2023-05-05 12:30:30
The most authoritative answer in 2024
  • Harper Patel——Studied at the University of Amsterdam, Lives in Amsterdam, Netherlands.

    This is neccesary because main() is called by the JVM before any objects are made. Since it is static it can be directly invoked via the class. Similarly, we use static sometime for user defined methods so that we need not to make objects. void indicates that the main() method being declared does not return a value.read more >>
    +119962023-05-06 12:30:30

About “方法、静态、这是”,people ask:

READ MORE:

QuesHub is a place where questions meet answers, it is more authentic than Quora, but you still need to discern the answers provided by the respondents.

分享到

取消