FileDocCategorySizeDatePackage
SampleConstructor.javaAPI DocExample1534Tue Dec 12 18:58:48 GMT 2000None

SampleConstructor

public class SampleConstructor extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

      Rectangle r = new Rectangle();
      showConstructors(r);
   
static voidshowConstructors(java.lang.Object o)

      Class c = o.getClass();
      Constructor[] theConstructors = c.getConstructors();
      for (int i = 0; i < theConstructors.length; i++) {
         System.out.print("( ");
         Class[] parameterTypes = theConstructors[i].getParameterTypes();
         for (int k = 0; k < parameterTypes.length; k ++) {
            String parameterString = parameterTypes[k].getName();
            System.out.print(parameterString + " ");
            }
         System.out.println(")");
         }