当前位置:编程学习 > JAVA >>

java小程序TestBitwiseOperator

package ch3;
public class TestBitwiseOperator {
 public static void main(String[] args) {
  int a = 9 & 12;
  int b = 9 | 12;
  int c = 9 ^ 12;
  int d = ~12;
  System.out.print("9 & 12 = " + a);
  System.out.println("\t9 | 12 = " + b);
  System.out.print("9 ^ 12 = " + c);
  System.out.println("\t~12 = " + d);
 }
}
补充:软件开发 , Java ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,