Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Meh {
- interface I1 {
- Foo<Number> m(String s);
- }
- interface I2 {
- Foo<Number> m(Integer i);
- }
- static class Foo<T extends Number> {
- Foo(T t) {
- System.out.println(t);
- }
- }
- private static void m(I1 i) {
- i.m("Foo");
- }
- private static void m(I2 i) {
- i.m(42);
- }
- public static void main(String[] args) {
- m(Foo::new);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement