Java 方法的定义与调用
Java 方法的定义与调用
package cn.geekeryi;
public class TestMethod {
public static int loveU(String name,int num) {
System.out.println("I love U!");
System.out.println("我爱你!");
System.out.println("520!");
System.out.println(name+"爱你"+num+"年");
return 8;
}
public static void main(String[] args) {
loveU("瓜皮",50);
loveU("憨批",99);
System.out.println(loveU("憨批",99));
}
}