What will be printed as a program result?

public class Test {
    public static void main(String args[]) {
        System.out.println(6^3);
    }    
}
Explanation
"Sum by module 2" is performed for all the bits of the left and right operand pairs
6 = 110
3 = 011
6^3 = 101

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback