This week's giveaway is in the Cloud/Virtualization forum. We're giving away four copies of Production-Ready Serverless (Operational Best Practices) and have Yan Cui on-line! See this thread for details.
Some things to fix in your code - the charAt() method returns a character and in your if statement, you are comparing it to a string (the double quotes mean String). Secondly, you are not doing a comparison in your if statement - you are specifying an assignment. You need to use ==. Also, you need to add parantheses to the length method call - numword.length().
Here's the "fixed" code:
Hope this helps. JD [ January 05, 2005: Message edited by: John Dell'Oso ]
posted 14 years ago
Thankyou JD and everyone else. However, I've now moved on!
Taking the TEST example again, charAt(n) only gives me one charachter. What do I need if I want say the 2nd and 3rd chars? ie return ES