FileDocCategorySizeDatePackage
SampleNoArg.javaAPI DocExample1494Tue Dec 12 18:58:50 GMT 2000None

SampleNoArg

public class SampleNoArg extends Object

Fields Summary
Constructors Summary
Methods Summary
static java.lang.ObjectcreateObject(java.lang.String className)

      Object object = null;
      try {
          Class classDefinition = Class.forName(className);
          object = classDefinition.newInstance();
      } catch (InstantiationException e) {
          System.out.println(e);
      } catch (IllegalAccessException e) {
          System.out.println(e);
      } catch (ClassNotFoundException e) {
          System.out.println(e);
      }
      return object;
   
public static voidmain(java.lang.String[] args)

      Rectangle r = (Rectangle) createObject("java.awt.Rectangle");
      System.out.println(r.toString());