Should we use Instanceof in Java?

The result of the operation is either true or false. It’s also known as type comparison operator because it compares the instance with type. Before casting an unknown object, the instanceof check should always be used . Doing this helps in avoiding ClassCastException at runtime.6 Ağu 2020

Sizin İçin Seçtik  23 plaka hangi şehir?

Leave a Reply

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