Hi,
Change this line
A a = null;
to
A a=new A();
You will get run time error...
And...
One of the points in Narrowing conversion from the JLS says..
From any class type S to any interface type K, provided that S is not final and does not implement K. (An important special case is that there is a narrowing conversion from the class type Object to any interface type.)
So now if you change your class A as
final class A{void m(){}}
and then compile...You will get the compilation error...
Further reasoning would be appreciated...
[ October 06, 2005: Message edited by: A Kumar ]