What does 'public static void' mean in Java?

后端 未结 9 1058
忘掉有多难
忘掉有多难 2020-11-29 14:29

What does public static void mean in Java?

I\'m in the process of learning. In all the examples in the book I\'m working from public static void

9条回答
  •  执念已碎
    2020-11-29 15:20

    Public - means that the class (program) is available for use by any other class.

    Static - creates a class. Can also be applied to variables and methods,making them class methods/variables instead of just local to a particular instance of the class.

    Void - this means that no product is returned when the class completes processing. Compare this with helper classes that provide a return value to the main class,these operate like functions; these do not have void in the declaration.

提交回复
热议问题