Last active
August 29, 2015 14:21
-
-
Save anton0xf/832bfd2d4c153e3f6ff2 to your computer and use it in GitHub Desktop.
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
import java.lang.reflect.Method; | |
public class TypeCheck { | |
public static void main(String args[]) throws Exception { | |
A o = new A(); | |
Method f = A.class.getMethod("f", int.class); | |
f.invoke(o, 1.0); | |
} | |
} | |
class A { | |
public void f(int a) { | |
System.out.println("" + a); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment