Difference between "==null" and ".equals(null)"
== reference compare;
.equals() is a method;
notification: while sample = null; sample.equals(null) will throw NullPointerException.
refer topic links: topics link
时间: 2024-11-09 11:57:47
Difference between "==null" and ".equals(null)"
== reference compare;
.equals() is a method;
notification: while sample = null; sample.equals(null) will throw NullPointerException.
refer topic links: topics link