CodePudding user response:
The format of the method is:Modifier list return value type method name (in the form of argument list) {
Method body code;
}
Public static modifiers, so the public static two together form the list of the modifier, said the public and static, so use public static modified is class level method, also called static method, this method is called, direct: the name of the class. The method name (argument list);
Private void, only the private modifier, void return value types, so this method, the modifier list only in private, the return value type is void,
What is the meaning of void? Void is not return a value of type, is a void method, there is no return value, that is, no return... ; This kind of code, you get it
CodePudding user response:
In addition, the meaning of the private, private, use the word modified method or member variables, can only be accessed in the current class, not to be access to other class, it also embodies the encapsulation of one of the three features of JavaCodePudding user response:
Understand, and also want to ask me to send the first picture annotation set jL for//what is the meaning of the size of the? I dropped my comments that found running results did not change theCodePudding user response: