So I declare a variable some where and initialize it. Now later on I need to use it to loop while its still positive so I need to decrement it. To me looping using a condition a
another way is this one:
Integer i = 10; while(--i>0) { System.out.println(i); }
When i is 0 while condition is false... so.. it will print from 9 to 1 (9 items)
Integer i = 10; while(i-->0) { System.out.println(i); }
Will print from 9 to 0... (10 items);