FileDocCategorySizeDatePackage
SampleArray.javaAPI DocExample1681Tue Dec 12 18:58:50 GMT 2000None

SampleArray

public class SampleArray extends Object

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

      KeyPad target = new KeyPad();
      printArrayNames(target);
   
static voidprintArrayNames(java.lang.Object target)

      Class targetClass = target.getClass();
      Field[] publicFields = targetClass.getFields();
      for (int i = 0; i < publicFields.length; i++) {
         String fieldName = publicFields[i].getName();
         Class typeClass = publicFields[i].getType();
         String fieldType = typeClass.getName();
         if (typeClass.isArray()) {
            System.out.println("Name: " + fieldName + 
               ", Type: " + fieldType);
         }
      }