[单选题]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);}}程序运行的结果是y= ( )。
北开题库
|
2023-10-01 08:01:46
|
24
[单选题]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);}}程序运行的结果是y= ( )。

A.10
B.96
C.30
D.40
查看答案

国家开放大学

形成性考核

您可能感兴趣的试题
TOP