Get super class for an interface in Java
Description
The following code shows how to get super class for an interface.
Example
//from ww w . ja v a2 s . co m
public class Main {
public static void main(String[] argv) throws Exception {
Runnable o2 = new Runnable() {
public void run() {
}
};
Class sup = o2.getClass().getSuperclass(); // java.lang.Object
System.out.println(sup);
}
}
The code above generates the following result.