< prev index next >

src/java.base/share/classes/java/util/Objects.java

Print this page

        

*** 60,74 **** /** * Returns {@code true} if the arguments are equal to each other * and {@code false} otherwise. * Consequently, if both arguments are {@code null}, {@code true} ! * is returned. Otherwise, if the first argument is not {@code ! * null}, equality is determined by calling the {@link ! * Object#equals equals} method of the first argument with the ! * second argument of this method. Otherwise, {@code false} is ! * returned. * * @param a an object * @param b an object to be compared with {@code a} for equality * @return {@code true} if the arguments are equal to each other * and {@code false} otherwise --- 60,73 ---- /** * Returns {@code true} if the arguments are equal to each other * and {@code false} otherwise. * Consequently, if both arguments are {@code null}, {@code true} ! * is returned and if exactly one argument is {@code null}, {@code ! * false} is returned. Otherwise, equality is determined by using ! * the {@link Object#equals equals} method of the first ! * argument. * * @param a an object * @param b an object to be compared with {@code a} for equality * @return {@code true} if the arguments are equal to each other * and {@code false} otherwise
< prev index next >