public static void main(String[] args) {
boolean b1 = Boolean.parseBoolean("true");
System.out.println("b1=" + b1);//b1=true
b1 = Boolean.parseBoolean("false");
System.out.println("b1=" + b1);//b1=false
boolean b2 = Boolean.valueOf("true");
System.out.println("b2=" + b2);//b2=true
b2 = Boolean.valueOf("false");
System.out.println("b2=" + b2);//b2=false
boolean b3 = Boolean.getBoolean("true");
System.out.println("b3=" + b3);//b3=false
b3 = Boolean.getBoolean("false");
System.out.println("b3=" + b3);//b3=false
}
接口返回的map,里面的内容是true,由于错误使用getBoolean,结果使得程序进入迷之状态,更改valueOf后正常。。