Tags

,

public class TestReadInterfaces {

 B b;
 C c;    

 public TestReadInterfaces()    {
 A a = new A();
 Class [] fs = a.getClass().getInterfaces();
 for (int i=0; i<fs.length; i++)    {
 System.out.println(fs[i].getName());
 }
 }

 public static void main(String[] args) {
 new TestReadInterfaces();
 }

}

class A implements B, C {

}

interface B {

}

interface C {

}
Advertisements