charat

"The left-hand side of an assignment must be a variable" problem with charAt

private String kNow(String state, String guess) { for (int i = 0; i < word.length(); i++) { if (guess.equals(word.charAt(i))) { state.charAt(i) = word.charAt(i); } } return state; } state.charAt(i) part points the problem in the title. How can I solve the problem, if ...