蝴蝶刀刀
//求两个整数和,是新建了一个Java项目package ch01;public class Sum {public static int sum(int a,int b){int c;c=a+b;return c;}public static void main(String[] args) {// TODO Auto-generated method stubint x=2;int y=3;int z;z=sum(x,y); //调用上面的sum函数方法,这个过程就是传递,是形参传递;System.out.println(z);}}//输出结果是:5