我就不废话那么多,直接上代码: package sf.com.mainTest; public class Test { public static void main(String[] args) { System.out.println(new Test().isBool(null)); } public boolean isBool(String a){ return a.equals("true"); // return "null".equals(a);…
Part I:equals() (javadoc) must define an equivalence relation (it must be reflexive, symmetric, and transitive). In addition, it must be consistent (if the objects are not modified, then it must keep returning the same value). Furthermore, o.equals(n…