问题详情

public class XXK2 { private int a,b; public XXK2(int aa, int bb) {a=aa; b=bb;} public int f1(int x) { if(x>10) return a+b+3*x; else return a*b*x; } public static void main(String[] args) { XXK2 x=new XXK2(3,4); int y=x.f1(8);       System.out.println("y="+y); } }


<span>y、34</span>

<span>y、96</span>

时间:2021-07-17 19:36 关键词:

答案解析

<span>y=96</span>