It looks like you forgot to put your strings withing quotations in your if statements where you do the .endsWith() method calls. You also spelled "length" wrong in your comment. you didn't instantiate scanner properly. You also forgot semicolons on several lines. I dont think indexOf() is necessary in this case, you should probably be able to get away with using just substring() for your replacements and endsWith() to perform your checks.
No comments:
Post a Comment