KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > ReflectProblem


1 import java.lang.reflect.*;
2
3 public class ReflectProblem {
4     public static void main(String JavaDoc [] args) throws Exception JavaDoc{
5         Field f = C.class.getField("cf");
6         System.out.println(f);
7     }
8 }
9
10 interface I{}
11
12 class C implements I{
13     public int cf;
14 }
15
Popular Tags