java issue

disturbed13

Daemon Poster
Messages
1,154
im working my way through Teach Yourself Java 6 in 21 days
but im having an issue on day 3
tokenproblem.jpg

what one earth does all of this mean in NetBeans?
 
It means there's errors in your code!

In future, better to paste the entire code rather than just the screenshot, that way people can try and compile and see where the problems are definitively.

However, in your case:

Code:
StringTokenizer st1; st2;
...the first ; should be a comma instead. You're declaring a list of variables of the same type, which is in Java a comma separated list. The semicolon just goes at the end. When you fix this, the errors on st2 should all disappear.

Code:
st1 = new StringTokenizer(quote);
You haven't declared any variable called "quote" here, hence the error. I assume you meant quote1 which you declared on the previous line.

Your last line says "system.out" rather than "System.out" - it must be a capital, remember Java is case sensitive (and class names such as System should always start with capitals.)

If you're still having issues, post all the code here as text and I'll look more closely :)
 
thank you
next time ill look more closely at my code
and the code in the book that i am taking it from
i just got it to work after i fixed those issues

thanks again
 
Back
Top Bottom