Can one of you gurus please explain the following

This works:
Class c = Class.forName("String");


This gets "java.lang.ClassNotFoundException: String":
String string = new String("String");
Class c = Class.forName(string);


This works:
String string = new String("java.lang.String");
Class c = Class.forName(string);


Why would a the string literal work?  It still gets turned into a String
object, yet the actual variable instance only works on the fully qualified
type name.

Thanks

Jeff

To change your JDJList options, please visit: http://www.sys-con.com/java/list.cfm

Reply via email to