G
gk
code 1
======
boolean b1=true;
boolean b2=true;
System.out.println(b1|b2);
what does bitwise operator do for boolean variables...?How it works?
N.B
Lets look the following piece of code below...
byte b1=3; //011
byte b2=2; //010
System.out.println(b1|b2); //011 == 3
so this is basically doing bitwise OR operation,but i am in confusion
how it will calculate the similar for boolean type in (code 1),will u
please tell how it works?
======
boolean b1=true;
boolean b2=true;
System.out.println(b1|b2);
what does bitwise operator do for boolean variables...?How it works?
N.B
Lets look the following piece of code below...
byte b1=3; //011
byte b2=2; //010
System.out.println(b1|b2); //011 == 3
so this is basically doing bitwise OR operation,but i am in confusion
how it will calculate the similar for boolean type in (code 1),will u
please tell how it works?