Yes, it should be a character. Remember that character lliterals have single quote marks around them like 'a' which is quite a different thing than a variable like a
---
If you've covered...
Type: Posts; User: pbrockway2
Yes, it should be a character. Remember that character lliterals have single quote marks around them like 'a' which is quite a different thing than a variable like a
---
If you've covered...
You are passing the indexOf() method a String, "a". Read the documentation linked to for indexOf() to see what sort of thing the argument should be.
Strictly speaking you weren't asked to ignore nonbase characters, you were asked to asked to ignore strings that contained such characters.
You can test if some character ch is in a String str...