Hi all,
i'm trying to understand java behaviour. Using this interfaces :
public interface IA {}
public interface IB extends IA {}
public class myClass implements IB {}
I'm overloading a method like this :
public void method(IA a);
public void method(IB b);
When calling method with the following object :
IA a = new myClass();
method(a);
Why does java use :
public void method(IA a);
instead of
public void method(IB b);
?
Thanks