/**
*
*/
package com.mischen.cn;
/**
* @author mischen
*
*/
public class Test1 {
private static int j=0;
private static boolean methodB(int k){
j += k;
switch(j){
case(4):
j+=1;
case(8):
j+=2;
case(12):
j+=3;
}
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);//10
boolean c;
//c=true | false;
c=false | true;
System.out.println(c);//true
}
}
b=i<10 | methodB(4);b=i<10 || methodB(8);
最新推荐文章于 2021-09-10 23:58:31 发布