Created
January 22, 2014 15:14
-
-
Save hborders/8560409 to your computer and use it in GitHub Desktop.
Class<?> varargs example from https://twitter.com/natesbrain/status/425720792760856576 compiles file for me.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class A { | |
| } | |
| class B extends A { | |
| } | |
| class C extends A { | |
| } | |
| class D { | |
| void foo(Class<?>... classes) { | |
| } | |
| void bar() { | |
| foo(B.class, C.class); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment