What will the following class print ?
class InitTest
{
public static void main(String[] args)
{
int a = 1;
int b = 1;
a = a++;
b = b++ + b;
System.out.println(a+ " "+b);
}
}
How come the answer is 1,3 for the above code? I am not able to get my head around this stuff...please somebody explain. I thought it 2,3.