^ : 位元互斥or
| : 位元or
public class OperatorDemo {
public static void main(String [] args){
int one = 0x01;
int zero = 0x00;
System.out.println(one & zero);
System.out.println(one ^ zero);
System.out.println(one | zero);
}
}
沒有留言:
張貼留言