Write a program for addition of two numbers without using addition operator in java ?
package javatute;
import java.util.Scanner;
public class SumOfTwoNosWithoutUsingAdditionOperator {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("enter first number");
int n1 = in.nextInt();
System.out.println("enter seccond number");
int n2 = in.nextInt();
while (n2 != 0) {
int n3 = (n1 & n2);
n1 = n1 ^ n2;
n2 = n3 << 1;
}
System.out.println("sum of two number is:" + n1);
}
}