Using equals() method of the Object class In the same way the equals() method of the object class accepts two String values and returns a boolean value, which is true if both are equal (or, null) and false if not.
Read moreCan null == null in Java?
println(“(Object)string == number: ” + ((Object)string == number)); To conclude this post and answer the titular question Does null equal null in Java? the answer is a simple yes .31 Eki 2018
Read more