/*
java.util.List is an interface
*/
publicclass MainClass {
publicstaticvoid main(String[] unused) {
try {
String n = "java.util.List";
Class c = Class.forName(n);
if (c.isInterface()) {
System.out.println(n + " is an interface");
} else {
System.out.println(n + " is not an interface");
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
}