its giving me a dumb @$$ error,
The Method "int stage1();" must contain a return statement with an expression compatible with type "int".
how do i fix it???
and if you see any thing else that i should do, please speak up.
Sponsor Sponsor
md
Posted: Wed May 31, 2006 11:38 am Post subject: (No subject)
you need to return an int with the return statement
magicman
Posted: Wed May 31, 2006 11:41 am Post subject: (No subject)
Common man, thats not even funny...
i would like some REAL HELP!!!!!
wtd
Posted: Wed May 31, 2006 12:02 pm Post subject: (No subject)
I'm guessing that you have absolutely no idea why there's an "int" in "public static int"".
This is a phenomenally important concept to understand. Read my Introduction to Java. It's available in the Java Tutorials forum.
md
Posted: Wed May 31, 2006 12:38 pm Post subject: (No subject)
I was serious. It's a very clear error message.
codemage
Posted: Wed May 31, 2006 12:54 pm Post subject: (No subject)
Enough of the slack jawed non-helpful comments. Read below for some super-secret REAL help:
Quote:
You need to return an int with the return statement.
wtd
Posted: Wed May 31, 2006 1:26 pm Post subject: (No subject)
codemage wrote:
Enough of the slack jawed non-helpful comments. Read below for some super-secret REAL help:
Quote:
You need to return an int with the return statement.
Mine was not a non-helpful comment.
This is a fine suggestion, except that it does not address the (suspected) underlying issue, which is connecting the "int" in "public static int" with the method returning an int.
If a programmer can "get" that, then it's a simple matter to realize that "public static String" for instance means the method has to return a String.
Then of course you have to understand what public and static mean.