charAt(1-userSentLength)
What do you expect that method call to do?
You need to read the API doc for that method to see what it does!!!
Java Platform SE 6
Type: Posts; User: Norm
charAt(1-userSentLength)
What do you expect that method call to do?
You need to read the API doc for that method to see what it does!!!
Java Platform SE 6
charAt (1-XXX) was an example of code that I used to explain how to use the method. It is not for you to use in your code.
You need to look at the letters one at a time (in a loop??) and...
What value do you want in the charAt() method call?
It must be a value from 0 to the length of the String -1.
The expression: (1 - XXX) will be 0 when XXX is 1 and it will be less than zero when...
What value do you want to pass to the charAt() method here?
userSent.toLowerCase(charAt(1-int numLetters));
int is a keyword and it looks out of place on line 20.
Please Edit your post and wrap your code with
<YOUR CODE HERE>
to get highlighting
Your unformatted code is very hard to read.
Where is line 20?
Can you get the full text of the error message? If so, post it.
Does it have a line number or show the source line with the problem?