1. 程式人生 > >Object equals 方法

Object equals 方法

  public static boolean equals(Object a, Object b) {
        return (a == b) || (a != null && a.equals(b));
  }

  public static String toString(Object o) {
        return String.valueOf(o);
  }