make Xor between two integer value - Java java.lang

Java examples for java.lang:int

Description

make Xor between two integer value

Demo Code


//package com.java2s;

public class Main {
    public static void main(String[] argv) throws Exception {
        int value1 = 2;
        int value2 = 2;
        System.out.println(makeXor(value1, value2));
    }//from  w  w w .  j av a  2 s.  c  o m

    public static int makeXor(int value1, int value2) {
        return value1 ^ value2;
    }
}

Related Tutorials