We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6f2f47c commit c96226aCopy full SHA for c96226a
tests/isolated/ReflectionMemoryTest.java
@@ -0,0 +1,19 @@
1
+import java.lang.reflect.Field;
2
+import java.lang.reflect.Method;
3
+
4
+public class ReflectionMemoryTest {
5
+ static boolean b;
6
7
+ public static void main(String[] args) {
8
+ ReflectionMemoryTest s = new ReflectionMemoryTest();
9
+ Class cls = s.getClass();
10
+ Field[] fields = cls.getDeclaredFields();
11
+ Method[] methods = cls.getDeclaredMethods();
12
+ System.out.println(fields.length);
13
+ for (int i = 0; i < 100000; i++) {
14
+ System.out.println(fields[0].getType());
15
+ System.out.println(methods[0].getReturnType());
16
+ System.out.println(i);
17
+ }
18
19
+}
0 commit comments