What will be printed as a program result?

public class Test {
    public static void main(String args[]) {
        System.out.println(6^3);
    }    
}
Explanation
Exclusive or or exclusive disjunction( "XOR") 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
Keep exploring
Java quizzes
Cosmo
Sign Up Now
or Subscribe for future quizzes