public static void main(String[] args) { String s1 = new String("true"); Boolean b1 = new Boolean(true); if (s1.equals(b1)) { System.out.println("true"); } }
public class EqualsTest { public static void main(String[] args) { String s1 = new String("true"); Boolean b1 = new Boolean(true); if (s1.equals(b1.toString())) { // 改动一下这里就OK了 System.out.println("true"); } } }