Tuesday, 19 July 2011

Subtract Two numbers without minus

public class Subtraction {

    public static void main(String[] args) {
       int number1 = 10;
       int number2 = 1;

       int result = ~(~number1+number2);
        System.out.println(result);
    }
}

No comments:

Post a Comment