String () { if (result.isEmpty()) { return "NO_CANDIDATES"; } StringBuilder stringBuilder = new StringBuilder(); Collections.sort(result); for (String s : result) { stringBuilder.append(s).append("\n"); } return stringBuilder.toString().trim(); }