Hello,
It's a very simple looping question but I want to figure it out why the result is this.
int y = 6;
while(y-- > 1){
System.out.println(y);
}
Output:
5
4
3
2
1
Why 1 is shown on output?
Thanks.
| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | VB Forums | Developer.com |
|
Results 1 to 3 of 3
Thread: Simple While Looping QuestionThreaded View
|
Click Here to Expand Forum to Full Width |