01: package javatests;
02:
03: import java.util.Date;
04:
05: public class AnonInner {
06: public int doit() {
07: Date d = new Date() {
08: public int hashCode() {
09: return 2000;
10: }
11:
12: //XXX: stuck compareTo to make the compiler happier.
13: // hopefully this doesn't mess up the test.
14: public int compareTo(Object x) {
15: return 0;
16: }
17: };
18: return d.hashCode();
19: }
20: }
|