Exception in thread “main” java.lang.NumberFormatException: For input string: “S” [closed]
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . I get this error when I try to use Integer.parseInt() with a single char. String s = "s"; System.out.println((char) Integer.parseInt(s)); Is what gives me the error is this: Exception in thread "main" java.lang.NumberFormatException: For input string: "S" 回答1: The letter S is not a number. Did you mean to write