Two main characteristics of an object:
Properties and Methods
1. Method:
The access modifier method returns a value type method name () {
The body of the method
Public String Play () {}
1. No parameter method
has a return value
For example:
Public String Play () {//return value type and method return value type are consistent return "hehe";}
No return value
For example:
public void Play () {}
2. With the Parameter method
Allows mutual invocation between methods
2. member variables and local variables
A member variable refers to a variable in a class//can be used anywhere in a class! Java will give the member variable an initial value
Local variable refers to the variable in the method//can only be used inside the method, out of the way is not in! Java does not give initial values to local variables
Local variables have higher precedence in the same class when the member variable and local variable have the same name
3.JavaDoc
The non-argument of the class