.
Home About-us Privacy Policy Contact-us Services

Friday, October 16, 2015

Java - Bitwise Operator Example - Allprogramexample

ad+1

Bitwise Operator Example
class bitwise
{
 public static void main(String args[])
 {
  int a=22,b=10,and,or,comp,xor,rs,ls;
and=a&b;
or=a|b;
comp=~a;
xor=a^b;
rs=a<<2;
ls=a>>2;
System.out.println("and "+and);
System.out.println("or "+or);
System.out.println("comp "+comp);
System.out.println("xor "+xor);
System.out.println("rs "+rs);
System.out.println("ls "+ls);
}
}

0 comments:

Post a Comment

Home About-us Privacy Policy Contact-us Services
Copyright © 2014 All Programs Examples | All Rights Reserved. Blogger Templates Download Blogger Templates