Search:

Type: Posts; User: tcstcs

Search: Search took 0.15 seconds.

  1. Replies
    8
    Views
    4,736

    Re: Is Downcasting possible in Java??

    yeah... that cleared my doubt of down casting.
  2. Replies
    8
    Views
    4,736

    Re: Is Downcasting possible in Java??

    @KevinWorkman , Can u explain with example what is ur understanding of downcasting. Thanks in advance
  3. Replies
    8
    Views
    4,736

    Re: Is Downcasting possible in Java??

    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;
  4. Replies
    8
    Views
    4,736

    Is Downcasting possible in Java??

    Hi,

    Is downcasting possible in Java?? Googled for "Downcasting", everyone says it fails at run time.. So is there a way to achieve downcasting??
Results 1 to 4 of 4