What is need of object type casting?

Downcasting is necessary to gain access to members specific to subclass . Downcasting is done using cast operator. To downcast an object safely, we need instanceof operator. If the real object doesn’t match the type we downcast to, then ClassCastException will be thrown at runtime.18 May 2021

Sizin İçin Seçtik  19 tl kaç dolar oluyor?

Leave a Reply

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