| Author |
illegal start of expression ??
|
Sonu Shawnee
Greenhorn
Joined: Jul 10, 2002
Posts: 21
|
|
What wring with this code, thats making it cough these errors ??[ edited to preserve formatting using the [code] and [/code] UBB tags -ds ] [ July 30, 2002: Message edited by: Dirk Schreckmann ]
|
 |
nupur dhawan
Ranch Hand
Joined: Jun 26, 2002
Posts: 71
|
|
Try this, hope it helps ! please let me know if that helped . [ edited to preserve formatting using the [code] and [/code] UBB tags -ds ] [ July 30, 2002: Message edited by: Dirk Schreckmann ]
|
Nupur. <br />SCJP2.
|
 |
Sonu Shawnee
Greenhorn
Joined: Jul 10, 2002
Posts: 21
|
|
That helped a bit I guess as now its just one error instead of two.Thanks. [ edited to preserve formatting using the [code] and [/code] UBB tags -ds ] [ July 30, 2002: Message edited by: Dirk Schreckmann ]
|
 |
nupur dhawan
Ranch Hand
Joined: Jun 26, 2002
Posts: 71
|
|
Originally posted by Sonu Shawnee: That helped a bit I guess as now its just one error instead of two. RANData.java:117: illegal start of expression for(int i = 0; i < NUMBER_OF_QUESTIONS; i++) ^ 1 error Thanks.
Well , Sonu , the reason for that is that you cannot have a for loop as one of the operands of a && operator ....which is what you have done in your case .The logicals operator can be used to test if either of the operands are true or false , that is to test boolean conditions . the operands can be expressions which evaluate to true or false , but cannot be a for loop !!
|
 |
Sonu Shawnee
Greenhorn
Joined: Jul 10, 2002
Posts: 21
|
|
got it !! Yeah, I realized that and so I put the code this way !! That solved the problem !! Thanks a bunch !! [ edited to preserve formatting using the [code] and [/code] UBB tags -ds ] [ July 30, 2002: Message edited by: Dirk Schreckmann ]
|
 |
nupur dhawan
Ranch Hand
Joined: Jun 26, 2002
Posts: 71
|
|
Hey Sonu , that looks much better . I'm glad i could be of help .
|
 |
Ilja Preuss
author
Sheriff
Joined: Jul 11, 2001
Posts: 14112
|
|
You could also replace by which is the short form of
|
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
|
 |
 |
|
|
subject: illegal start of expression ??
|
|
|