The main Method

The main Method

You can call static methods without having any objects. For example, you never construct any objects of the Math class to call Math.pow.

For the same reason, the main method is a static method.

The main method does not operate on any objects. In fact, when a program starts, there aren't any objects yet. The static main method executes, and constructs the objects that the program needs.

posted @ 2017-06-28 11:01  2021年的顺遂平安君  阅读(45)  评论(0编辑  收藏  举报