KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tctest > transparency > SuperClassWithFields


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tctest.transparency;
5
6 public class SuperClassWithFields {
7
8   protected int i;
9
10   public synchronized void method1() {
11     System.err.println(this + " = " + i);
12   }
13
14   public String JavaDoc toString() {
15     return "SuperClassWithFields";
16   }
17
18   public boolean equals(Object JavaDoc o) {
19     if (this == o) return true;
20     if (o instanceof SuperClassWithFields) { return this.i == ((SuperClassWithFields) o).i; }
21     return false;
22   }
23
24 }
25
Popular Tags