Can we use equals with null?

It’s entirely possible for two distinct object instances to be “equal” according to their contract. And then there’s the minor detail that since equals is a method, if you try to invoke it on a null reference, you’ll get a NullPointerException .

Sizin İçin Seçtik  How long will it take to learn blockchain?

Leave a Reply

Your email address will not be published. Required fields are marked *