01: /*
02: * ArrayTestClass.java --
03: *
04: * Used to test the java::info command
05: *
06: * Copyright (c) 1997 by Sun Microsystems, Inc.
07: *
08: * See the file "license.terms" for information on usage and redistribution
09: * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
10: *
11: * RCS: @(#) $Id: ArrayTestClass.java,v 1.1 1999/05/10 04:09:05 dejong Exp $
12: */
13:
14: package tests.invoke;
15:
16: public class ArrayTestClass {
17:
18: public int i;
19: public int[] iA;
20: public int[][] iAA;
21: public String s;
22: public String[] sA;
23: public String[][] sAA;
24:
25: public ArrayTestClass() {
26: i = 5;
27: iA = new int[2];
28: iAA = new int[4][2];
29: s = "white";
30: sA = new String[2];
31: sAA = new String[4][2];
32: }
33:
34: public static String yellow() {
35: return ("yello moons");
36: }
37:
38: public static String rainbow(String color) {
39: return ("new feature color: " + color);
40: }
41:
42: public int[] pink() {
43: int[] tt;
44: tt = new int[2];
45: tt[0] = 8;
46: tt[1] = 9;
47: return (tt);
48: }
49:
50: public String pink(int a, int b, int c) {
51: return ("purple horseshoes: " + iA[0] + " " + iA[1]);
52: }
53:
54: public static int[][] pink(int a) {
55: int[][] tt;
56: tt = new int[4][2];
57: return (tt);
58: }
59:
60: public static String pink(int[][] a, int b) {
61: return ("pink hearts, int[][]");
62: }
63:
64: public String[] blue() {
65: String[] tt;
66: tt = new String[2];
67: tt[0] = "orange";
68: tt[1] = "stars";
69: return (tt);
70: }
71:
72: public String blue(int a, int b, int c) {
73: return (sA[0] + " " + sA[1]);
74: }
75:
76: public static String[][] blue(int a) {
77: String[][] tt;
78: tt = new String[4][2];
79: return (tt);
80: }
81:
82: public static String blue(String[][] a, int b) {
83: return ("blue diamonds, String[][]");
84: }
85:
86: public static Integer[][] green(int a) {
87: Integer[][] ii;
88: ii = new Integer[4][2];
89: return (ii);
90: }
91:
92: public static String green(Integer[][] a, int b) {
93: return ("green clovers, java.lang.Integer[][]");
94: }
95: }
|