SampleGetArraypublic class SampleGetArray extends Object
Methods Summary |
---|
public static void | copyArray(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 void | main(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);
|
|