Method definition
public class Demo01
{
public static void main (String []args){
}
public String seeHello (){
return "hello";
}
public static void hello(){
}
public int max (int a,int b){
return a>b ? a : b;
}
}
- Return type
- break: Jump out of the loop and end the loop and return the difference between return value
- Method name pay attention to standard hump nomenclature see the meaning of the name
- Parameter list (parameter type parameter name) …variable parameter.
- Exception thrown
Method call
- Static method
- Non-static method
- Formal and actual parameters
- Pass by value and pass by reference
- this keyword