Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: ERROR MESSAGE ASSISTANCE

Re: ERROR MESSAGE ASSISTANCE

From: Lonnie <lonnie2000_at_atl.mediaone.net>
Date: Sat, 03 Mar 2001 21:01:47 GMT
Message-ID: <%Yco6.27098$Z8.4673214@typhoon.southeast.rr.com>

"> GuessingGame.java:37: Type expected.
> else
> ^
>
> another question: How far does JAVA compile before it displays error
> messages. I assume it does not go through the entire program and come
 back
> with all errors?
> Thanks for anyone's help
> --------------------------------
> class GuessingGame{
> public static int IsCorrect(int guess) {
> if (guess == 42) {
> return 0;
> }
> else {
> if(guess > 42) {
> return 1;
> }
> else {
> return -1;
> }
> }//end of if
> }//end of isCorrect
>
> public static void main (String args[]) {
> int guess, i, isCorrect;
>
> //Initialization
> i = 1;
>
> while ((guess != 42) || (guess !=0)) {
> System.out.println ("Guess my number (1-100)");
> System.out.println ("Enter 0 to quit");
> guess = Keyboard.readInt ();
> isCorrect = GuessingGame;
>
> isCorrect(guess);
>
> if(isCorrect ==0);
> System.out.println ("You got it!!!!!!!!");
> System.exit (0);
> }
> elseif(isCorrect == -1);
> System.out.println ("Try a higher number!!!!!!!!");
> }
> else{
> System.out.println ("Try a lower number!!!!!!!");
> }
> }
> }
> }//end while

 System.exit(0);
> }//end class
> }
> }
>
> --
>
> "The World Steps Aside For Any Woman Who Knows Where She's Going"
> ~That which seeks to destroy me, only makes me stronger~
>
>
Received on Sat Mar 03 2001 - 15:01:47 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US