+ 1
2nd Dec 2017, 8:41 AM
â‚Čâ±€Ă˜Ă˜â‚ź
â‚Čâ±€Ă˜Ă˜â‚ź - avatar
4 Answers
+ 10
I have no idea about why do you want to print all the integers below 10, though it's syntax is wrong. A for loop works with three conditions (initialization; termination; increment/decrement) In your code, you've put the decrement at the "termination", and termination wants a boolean condition (thus it gives an error). Instead, put it at the "decrement": for(int i=10;;i--) { System.out.println(i); }
2nd Dec 2017, 9:00 AM
Dev
Dev - avatar
+ 2
it requires terminatio as mentioned abov
2nd Dec 2017, 9:17 AM
Sachin Lobo Jeppu
Sachin Lobo Jeppu - avatar
+ 1
even I got a doubt will that syntax works?
2nd Dec 2017, 9:16 AM
Sachin Lobo Jeppu
Sachin Lobo Jeppu - avatar
0
the syntax is not work .I am post this if anyone notice that or not
2nd Dec 2017, 9:49 AM
â‚Čâ±€Ă˜Ă˜â‚ź
â‚Čâ±€Ă˜Ă˜â‚ź - avatar