方法1,无返回值类型:
public static void test(){
syso(…)
}
调用:
test()
方法2,有返回值类型:
public static int test(int a){
return …;
}
调用:
int a=test(传个int类型的参数)
方法1,无返回值类型:
public static void test(){
syso(…)
}
调用:
test()
方法2,有返回值类型:
public static int test(int a){
return …;
}
调用:
int a=test(传个int类型的参数)