Possible Duplicate:
Why does this go into an infinite loop?
public class loop
{
    public static void main(String[] args)
    {
        int k=0;
        for (int i = 0; i < 6; i++) 
        {
            k = k++;
            System.out.println(k);            
        }
    }
}
out put :
0
0
0
0
0
0
Can You Please explain me why above resulting zeros even am incrementing k value and assigning it to k.
 
     
     
     
     
     
    