有参有返回值方法举例
例:计算两个数的和
package com.xuenixiang.Shin;
public class YouCanYouFanHuiZhi {
public int jiafa(int i,int j){
int count=i+j;
return count;
}
public static void main(String[] args) {
// TODO 自动生成的方法存根
YouCanYouFanHuiZhi a=new YouCanYouFanHuiZhi();
System.out.println(a.jiafa(123, 456));
}
}