forked from JavaTX/JavaCompilerCore
45 lines
490 B
Java
Executable File
45 lines
490 B
Java
Executable File
public class TestOperatorBitwise {
|
|
|
|
public m1(a,b) {
|
|
return a & b;
|
|
}
|
|
|
|
public m2(a,b) {
|
|
return a ^ b;
|
|
}
|
|
|
|
public m3(a,b) {
|
|
return a | b;
|
|
}
|
|
|
|
public m4(Integer a, b) {
|
|
return a & b;
|
|
}
|
|
|
|
public m5(a, Long b) {
|
|
return a & b;
|
|
}
|
|
|
|
public Integer m6(a,b) {
|
|
return a & b;
|
|
}
|
|
|
|
/* bit-shift not accepted by parser
|
|
|
|
public m7(a,b) {
|
|
return x << y;
|
|
}
|
|
|
|
public m8(a,b) {
|
|
return x >> y;
|
|
}
|
|
|
|
public m9(a,b) {
|
|
return x >>> y;
|
|
}
|
|
|
|
public m10(a) {
|
|
return ~a;
|
|
}
|
|
*/
|
|
} |