Closed gmelon closed 1 year ago
Objects.equals(Object object1, Object object2)에 null이 들어가면 false가 반환되는지?
@Test void objects_equals() { Objects.equals(null, new MyClass()); // always false } static class MyClass { }
-> 동작 중 null이 들어갈 수 있게 설계된 참조 객체 필드는 Objects.equals() 로 비교하기
Objects.equals(Object object1, Object object2)에 null이 들어가면 false가 반환되는지?