add solution for hw4:3435
This commit is contained in:
@@ -59,8 +59,8 @@ public class WordStatLengthSuffix {
|
||||
PrintWriter writer = new PrintWriter(outputFileName, "UTF-8");
|
||||
|
||||
for (WordInfo info : sortedWords) {
|
||||
if (info.word.length != 1) {
|
||||
writer.println(info.word.substring(info.word.length / 2) + " " + info.count);
|
||||
if (info.word.length() != 1) {
|
||||
writer.println(info.word.substring(info.word.length() / 2) + " " + info.count);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user