it says that the colon should be a semicolon... i am using a book to do this program and that is what it calls for and i know there are for loops as such
can you post the relevant code and the EXACT error message your getting? please use the code tags around your code, to preserve formatting. just use the handy "Instant UBB Code" buttons below to get the tags, then paste your code inside...
errr... the buttons are below when you are posting your reply, not when you're just viewing the thread, if i didn't make that clear [ December 20, 2005: Message edited by: fred rosenberger ]
chris barrett
Greenhorn
Joined: Dec 20, 2005
Posts: 10
posted
0
This is the class that gives me the error errors are
';' expected on line 17 illegal start of expression on line 31 illegal start of expression on line 32
It compiles without an error for me. When I execute the command java -version on my console I get this
java version "1.5.0_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing)
"Failure is not when you fall down; its only when you fail to get up again."
chris barrett
Greenhorn
Joined: Dec 20, 2005
Posts: 10
posted
0
ok i figured out the problem .. it was the compiler that i was using wasn't using java 5. it was using an older version so when i tryed it in bluej it compiles and runs. before i was using Jcreator and i don't know how to (or if you can) change the version of java it compiles with. But original problem fixed
chris barrett
Greenhorn
Joined: Dec 20, 2005
Posts: 10
posted
0
ok now i am saposed to upgrade the code to ask for a userinput as well and use ArrayList to make my life easyer but again i get a compile problem not with the extended for loop anymore though now the error is
[ December 20, 2005: Message edited by: chris barrett ] [ December 20, 2005: Message edited by: chris barrett ]
chris barrett
Greenhorn
Joined: Dec 20, 2005
Posts: 10
posted
0
that isn't saposed to be a smile. i didn't use the code button.
Originally posted by chris barrett: that isn't saposed to be a smile. i didn't use the code button.
When you are composing a post, there is a checkbox near the bottom of the page to "Disable smilies in this post." (Otherwise, a semicolon followed by a closing parenthesis will display as a winking smilie.)
You can go back and edit your own posts by clicking on the paper/pencil icon.
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer sscce.org
chris barrett
Greenhorn
Joined: Dec 20, 2005
Posts: 10
posted
0
thank you
i am still can't find/figure out why i keep getting that error though. [ December 20, 2005: Message edited by: chris barrett ]
...is telling you that your method setLocationCells is expecting an ArrayList (of Strings), but you are trying to call it using an int array instead. [ December 20, 2005: Message edited by: marc weber ]
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.