revwords.java corrected