方法的调用
package day2;
/*void只可单独调用不可打印和赋值
public class Hello {
public static void main(String[] args) {
//单独调用
sum(10,20);
//打印调用
System.out.println(sum(10,20));
//赋值调用
int n =sum(15,35);
System.out.println(n);
}
public static int sum(int a,int b){
System.out.println("执行了");
int result = a+b;
return result;
}
}