|
-
October 9th, 2000, 01:10 AM
#1
problem with post increment operator
JVM BUG???
Consider the following code
public class Test
{
public static void main(String arr[])
{
int i=0;
i=i++;
System.out.println|("Value of i is "+i);
}
}
What is the o/p??
I thought it should be 1..but it prints 0..ie the i++ part is ignored..
Can someone explain why??
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|