首页 试题广场 > 试题详情
单选题

Given the following code: public class Test {? ? private static int j = 0;? ? private static Boolean methodB(int k) {? ? ? ? j += k;? ? ? ? return true;? ? }? ? public static void methodA(int i) {? ? ? ? boolean b;? ? ? ? b = i < 10 | methodB(4);? ? ? ? b = i < 10 || methodB(8);? ? }? ? public static void main(String args[]) {? ? ? ? methodA(0);? ? ? ? System.out.println(j);? ? }}  What is the result?

  • A.The program prints 0 
  • B.The program prints 4 
  • C.The program prints 8 
  • D.The program prints 12 
提交并查看答案
下一题 上一题
Ke星伙伴们的回答/ 3个回答
关闭
关闭
QQ
交流群
邀请
好友
App
下载
意见
反馈
返回
顶部