我这个是模仿你的作的一个例子,没有任何问题啊
public class StrLength
{
public static int Print(String str,int i)
{
System.out.println(str + i);
return i - 1;
}
public static void main(String[] args)
{
String a = "a";
int b = 0 ;
b = Print(a,b-1);
System.out.println(b);
}
}
public class StrLength
{
public static int Print(String str,int i)
{
System.out.println(str + i);
return i - 1;
}
public static void main(String[] args)
{
String a = "a";
int b = 0 ;
b = Print(a,b-1);
System.out.println(b);
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货