diff --git a/java/wordStat/WordStatLengthSuffix.java b/java/wordStat/WordStatLengthSuffix.java index c9c5291..de59fdc 100644 --- a/java/wordStat/WordStatLengthSuffix.java +++ b/java/wordStat/WordStatLengthSuffix.java @@ -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); } }