import java.util.Observable;
import java.util.Observer;
class ApBase implements Runnable {
public void run() {
}
}
class ApDerived extends ApBase implements Observer {
public void update(Observable o, Object arg) {
}
}
public class MainClass {
public static void main(String[] argv) {
ApBase aBase = new ApBase();
ApDerived aDer = new ApDerived();
}
}
A. Runnable rn = aDer ;
B. Runnable rn2 = (Runnable) aBase ;
C. Observer ob = aBase ;
D. Observer ob2 = (Observer) aBase ;
|