FileDocCategorySizeDatePackage
SampleGetArray.javaAPI DocExample1397Tue Dec 12 18:58:50 GMT 2000None

SampleGetArray

public class SampleGetArray extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidcopyArray(java.lang.Object source, java.lang.Object dest)

      for (int i = 0; i < Array.getLength(source); i++) {
         Array.set(dest, i, Array.get(source, i));
         System.out.println(Array.get(dest, i));
      }
   
public static voidmain(java.lang.String[] args)

      int[] sourceInts = {12, 78};
      int[] destInts = new int[2];
      copyArray(sourceInts, destInts);
      String[] sourceStrgs = {"Hello ", "there ", "everybody"};
      String[] destStrgs = new String[3];
      copyArray(sourceStrgs, destStrgs);