What does `public static void main args` mean?

后端 未结 5 1248
不知归路
不知归路 2020-11-30 10:44

I am not sure what this means, whenever before you write a code, people say this

public static void main(String[] args) {

What does that m

5条回答
  •  失恋的感觉
    2020-11-30 11:22

    • Public = This method is visible to all other classes.

    • static = This method doesn't need an instance to be ran.

    • void = This method doesn't return anything.

    • main() = Main method (First method to run).

    • String[] = Array of strings.

    • args = Array name.

提交回复
热议问题