01: /*
02: * SuperTestClass.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: SuperTestClass.java,v 1.1 1999/05/10 04:09:06 dejong Exp $
12: */
13:
14: package tests.javainfo;
15:
16: public class SuperTestClass extends InfoTestClass {
17:
18: public int y;
19: int x;
20: public int a;
21: public int j;
22: public static int c;
23: public static int i;
24:
25: public InfoTestClass[] tArray;
26: public String[] sArray;
27: public byte[] bArray;
28: public char[] cArray;
29: public int[] iArray;
30: public Integer[] IArray;
31: public float[] fArray;
32:
33: public SuperTestClass() {
34:
35: x = 4;
36: y = 5;
37: z = 6;
38: }
39:
40: public int sum() {
41: return (x + y + z);
42: }
43:
44: public static String clue() {
45: return ("hint: z = x + 1");
46: }
47:
48: public static String herring(int a) {
49: return ("hint: z = x + 1");
50: }
51:
52: public static String herring(int a, double b, char c) {
53: return ("hint: z = x + 1");
54: }
55:
56: public void add1() {
57: ++x;
58: ++y;
59: ++z;
60: }
61:
62: public void add(int i, int j, int k) {
63: x += i;
64: y += j;
65: z += k;
66: }
67:
68: public int[] addArray(InfoTestClass[] itc, String[] s, Integer[] I) {
69: x += 1;
70: y += 2;
71: z += 3;
72: return iArray;
73: }
74:
75: public String[][] addArrayArray(String[][] s, int[][][] iAA) {
76: x += 1;
77: y += 2;
78: z += 3;
79: return s;
80: }
81:
82: private void guess() {
83: y = x + z - y;
84: }
85: }
|