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 (1);
System.out.println(j);
}
} 为何j=4?
请教!
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 (1);
System.out.println(j);
}
} 为何j=4?
请教!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货