yeah... that cleared my doubt of down casting.
Type: Posts; User: tcstcs
yeah... that cleared my doubt of down casting.
@KevinWorkman , Can u explain with example what is ur understanding of downcasting. Thanks in advance
Hi,
I have 2 classes Animal and Cat. And Cat extends Animal class.
Animal aa = new Animal();
Cat cc = new Cat();
//Downcasting code
if(aa instanceof Cat)
{
Cat c1 = (Cat)aa;
Hi,
Is downcasting possible in Java?? Googled for "Downcasting", everyone says it fails at run time.. So is there a way to achieve downcasting??