/*向方法传递多个参数 * 要以正确的数量,顺序,类型加以传递*/ public class Xiangfangfachuanduocanshu { public static void main(String[] args){ Xiangfangfachuanduocanshu s = new Xiangfangfachuanduocanshu(); s.go(); } void takeTwo(int x,int y){ int z=x+y; System.out.println("Total is "+z); } void go(){ int m = 12; int n = 34; takeTwo(m,n); } }