i was using the post increment in the while loop like this
int a= 0;
//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 ..
case 1: System.out.print("hello");
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 ..