public class Main {
public interface Foo {};
public static class Bar {};
public static class Baz extends Bar implements Foo {};
public static class Qux {
void f(Foo arg){ System.out.println("f(Foo) called"); }
void f(Bar arg){ System.out.println("f(Bar) called"); }
}
public static void g(Foo foo) {
Qux q = new Qux();
q.f(foo);
}
public static void main(String[] args) {
Baz b = new Baz();
g(b);
}
}
f(Foo) called
f(Bar) called
--
You received this message because you are subscribed to the Google Groups "Java2Script" group.
To unsubscribe from this group and stop receiving emails from it, send an email to java2script...@googlegroups.com.
To post to this group, send email to java2...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/java2script/e607f87e-9b8f-4f85-a92d-bfeadf84c094%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.