F
fishfry
Class c = Class.forName(classname);
classname c = new classname();
Doesn't seem to compile. My understanding is that the first line creates
c as a class whose name is classname. But I can't seem to use line 2 to
instantiate an object of that class. Do I have to use getConstructor()?
I can't seem to find any specific examples of this in the Sun tutorials,
perhaps someone can straighten me out. Thanks in advance.
classname c = new classname();
Doesn't seem to compile. My understanding is that the first line creates
c as a class whose name is classname. But I can't seem to use line 2 to
instantiate an object of that class. Do I have to use getConstructor()?
I can't seem to find any specific examples of this in the Sun tutorials,
perhaps someone can straighten me out. Thanks in advance.