Methods Summary |
---|
public static java.lang.String[][] | getArrayInfo()Return list of subscript names (unrealistic; just for demo).
String info[][];
info = new String[10][10];
for (int i=0; i < info.length; i++) {
for (int j = 0; j < info[i].length; j++) {
info[i][j] = "String[" + i + "," + j + "]";
}
}
return info;
|
public static java.lang.String[][] | getParameterInfo()Return list of allowable parameters (Applet method).
String param_info[][] = {
{"fontsize", "9-18", "Size of font"},
{"URL", "-", "Where to download"},
};
return param_info;
|
public static void | main(java.lang.String[] args)Run both initialization methods and print part of the results
print("from getArrayInfo", getArrayInfo());
print("from getParameterInfo", getParameterInfo());
|
public static void | print(java.lang.String tag, java.lang.String[][] array)Print selected elements from the 2D array
System.out.println("Array " + tag + " is " + array.length + " x " +
array[0].length);
System.out.println("Array[0][0] = " + array[0][0]);
System.out.println("Array[0][1] = " + array[0][1]);
System.out.println("Array[1][0] = " + array[1][0]);
System.out.println("Array[0][0] = " + array[0][0]);
System.out.println("Array[1][1] = " + array[1][1]);
|