[单选题]public class XXK2 {private final int a;public XXK2(int a) {this.a=a;}public int f1(int x) {if(x%2==1) return 2*(a+x);else return 3*a+x;}public int get( ) {return a;}public static void main(String[] args) {XXK2 x=new XXK2(8);int y=x.f1(20);y+=x.get( );System.out.println(y=+y);}}程序运行的结果是y=( )。
北开题库
|
2023-10-01 08:01:46
|
14
[单选题]public class XXK2 {private final int a;public XXK2(int a) {this.a=a;}public int f1(int x) {if(x%2==1) return 2*(a+x);else return 3*a+x;}public int get( ) {return a;}public static void main(String[] args) {XXK2 x=new XXK2(8);int y=x.f1(20);y+=x.get( );System.out.println(y=+y);}}程序运行的结果是y=( )。

A.11
B.22
C.33
D.100
查看答案

国家开放大学

形成性考核

您可能感兴趣的试题
TOP