Predict the output
public class Numbers {
public static void main(String[] args) {
int a = 1;
int b = 2;
System.out.println("a is " + a + " and b is " + b);
a = a + b;
b = a - b;
a = a - b;
System.out.println("After swapping, a is " + a + " and b is " + b);
}
}


Posted on by