FileDocCategorySizeDatePackage
SampleComponent.javaAPI DocExample1500Tue Dec 12 18:58:50 GMT 2000None

SampleComponent

public class SampleComponent extends Object

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

      int[] ints = new int[2];
      Button[]  buttons = new Button[6];
      String[][] twoDim = new String[4][5];

      printComponentType(ints);
      printComponentType(buttons);
      printComponentType(twoDim);
   
static voidprintComponentType(java.lang.Object array)

      Class arrayClass = array.getClass();
      String arrayName = arrayClass.getName();
      Class componentClass = arrayClass.getComponentType();
      String componentName = componentClass.getName();
      System.out.println("Array: " + arrayName + 
         ", Component: " + componentName);