blob: c1c2633bbd1a4ce25e61cb1407a1bd84c5a6d788 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
import javax.swing.*;
import javax.swing.border.*;
import javax.swing.event.*;
import javax.swing.plaf.FontUIResource;
import java.awt.*;
import java.awt.event.*;
import java.beans.*;
import java.io.*;
import java.util.EventObject;
import java.util.Vector;
public class InterfaceAndObject {
Timer t = null;
public static void main(String[] args) {
I i = new I() {};
System.out.println(i);
//new I() {}.toString();
}
}
class Root {
public String toString() { return "root"; }
}
class C extends Root implements I {}
class C1 extends Root implements I1 {
public Object clone() { return null; }
}
interface I0 {
public Object clone();
}
interface I {
//public void toString();
public boolean equals(Object o);
}
interface I1 extends I, I0 {
//public Object clone();
}
|