class Country{} interface My{} class Test{ public static void main(String args[]){ try{ Class c=Class.forName("Reflection.Country"); System.out.println(c.isInterface()); Class c2=Class.forName("Reflection.My"); System.out.println(c2.isInterface()); }catch(Exception e){System.out.println(e);} } }
No comments:
Post a Comment