Forum

> > Off Topic > Java for problem
Forums overviewOff Topic overviewLog in to reply

English Java for problem

2 replies
To the start Previous 1 Next To the start

old Java for problem

archmage
User Off Offline

Quote
I know a lot of you study a language other than Lua so I thought you might know Java. Well I am studying Java and I am having trouble with the for loop. This i just a test obviously it is not an app just a test for experience.
More >


I get an error saying "i can not be resolved" I also get "syntax error on token else"

old Re: Java for problem

YellowBanana
BANNED Off Offline

Quote
Dark Byte has written
I know a lot of you study a language other than Lua so I thought you might know Java. Well I am studying Java and I am having trouble with the for loop. This i just a test obviously it is not an app just a test for experience.
More >


I get an error saying "i can not be resolved" I also get "syntax error on token else"


1
for ( int i = 30; i > 0; i--)  //dont put a semicolon here..
Also u dont have to use the else{continue;} part, because it will automatically continue lol.

old Re: Java for problem

archmage
User Off Offline

Quote
thanks
but what about the else why does it not work i tried taking it out mbut it still prints 15

edit
oh i had a semicolon after the if

well here is the final (not that any one would want it)
More >
edited 1×, last 26.06.10 02:56:55 am
To the start Previous 1 Next To the start
Log in to replyOff Topic overviewForums overview