01: /*
02: * InfoTestClass.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: InfoTestClass.java,v 1.1 1999/05/10 04:09:06 dejong Exp $
12: */
13:
14: package tests.javainfo;
15:
16: import java.lang.*;
17: import java.awt.*;
18:
19: public class InfoTestClass {
20:
21: private int x;
22: public int y;
23: public int a;
24: public int b;
25: public static int c;
26: public static int d;
27: int z;
28:
29: public InfoTestClass() {
30:
31: x = 4;
32: y = 5;
33: z = 6;
34: }
35:
36: public int sum() {
37: return (x + y + z);
38: }
39:
40: public static String clue() {
41: return ("hint: z = x + 1");
42: }
43:
44: public static String herring(int a) {
45: return ("hint: z = x + 1");
46: }
47:
48: public static String herring(int a, double b) {
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: private void guess() {
69: y = x + z - y;
70: }
71: }
|