有一段程序是这样的:
public class Foo {
public double crazyCalc(doublex, inty) {
x+=--y/x++;
return x*y
}
public static void main(String…args) {
Foo foo = new Foo()
int a = 14, b = 3;
double c;
c= foo, crazyCalc(b, a/=2);
System.out.println(c+'' ''+a+'' ''+b);
}
}
答案输出分别为30.7 7 3
求大神指点30.7是如何算出来!!!
|
|