You can't cast upwards i.e. there is no
way to cast A to a child B. Class A doesn't
know anything about B.
It works other way round. It is possible to
cast B downwards to A, because B includes
the information of A.
Jari
> -Original Message-
> From: EXT SABYASACHI S GUPTA
> [mai
On Wed, 3 Nov 1999 15:11:16 +0530 (IST), SABYASACHI S GUPTA wrote:
>
>I have 3 files to test this.
>
>//A.java
>public class A {
> public void method(){
> System.out.println("In A");
> }
>}
>
>
>//B.java
>public class B extends A {
>
> public void method()
>