hello frnsss..
i was using the post increment in the while loop like this
int a= 0;
while(a++<8)
{
//body of the loop
}
when this will executes then it first increment the value of a and then do the comparison ..
but when i use the same in switch like this ..
int a=0;
switch(a++)
{
case 1: System.out.print("hello");
break;
default: System.out.print("deflt");
}
when this code executes it executes only default part .. which means it do not increments the value of a in switch..
how this behavior is different in switch and while statements when i use the post increment .. please explain ... this behavior of post increment in these cases ..
Thanks