String s1 = "false"; String s2 = "true"; String s3 = "fAlSe"; String s4 = "TrUe"; String s5 = "true_a"; 正确的方法 Boolean.parseBoolean(string s); System.out.println(Boolean.parseBoolean(s1)); System.out.println(Boolean.parseBoolean(s2)); System.out.println(Boolean.parseBoolean(s3)); System.out.println(Boolean.parseBoolean(s4)); System.out.println(Boolean.parseBoolean(s5));结果是:falsetruefalsetruefalse 错误的方法 Boolean.getBoolean(string s); System.out.println(Boolean.getBoolean(s1)); System.out.println(Boolean.getBoolean(s2)); System.out.println(Boolean.getBoolean(s3)); System.out.println(Boolean.getBoolean(s4)); System.out.println(Boolean.getBoolean(s5)); 以上5个的返回的值都为 false