String () { String[] idToValueLocal = idToValue; StringBuilder sb = new StringBuilder(); for (int i = 0; i < idToValueLocal.length; i++) { String value = idToValueLocal[i]; sb.append(value).append(" -> ").append(i + 1).append('\n'); } return sb.toString(); }