Created
June 2, 2016 16:06
-
-
Save LCamel/3f5af9fab09bee4bdceab40d56d82c3b to your computer and use it in GitHub Desktop.
inner class
This file contains 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.Constructor; | |
public class AA { | |
public static void main(String[] args) throws InterruptedException { | |
f1(); | |
} | |
private static void f1() { | |
int i = 3; | |
String s = "foo"; | |
Runnable r = new Runnable() { | |
@Override | |
public void run() { | |
System.out.println(i); | |
System.out.println(s); | |
} | |
}; | |
for (Constructor<?> constructor : r.getClass().getDeclaredConstructors()) { | |
System.out.println(constructor); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment