修饰符 返回值类型 方法名(参数类型 参数名){ ··· 方法体 ··· return 返回值 } //例如 public static int add(int a, int b) { return a + b; }