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) {
// TODO Auto-generated method stub
}
}
ApBase aBase = new ApBase() ;
ApDerived aDer = new ApDerived();
A. Object obj = aBase ;
Runnable rn = obj ;
B. Object obj = aBase ;
Runnable rn = (Runnable) obj ;
C. Object obj = aBase ;
Observer ob = (Observer)aBase ;
D. Object obj = aDer ;
Observer ob2 = obj ;
|