public class Abst {
public int apply(int a) {
return a + 3;
}
}
public interface Inte {
int apply(int a);
}
public class Top extends Abst implements Inte {
public void run() {
if (((Inte) this).apply(3) == 6) {
System.out.println("SUCCESS");
} else {
System.out.println("FAILURE");
}
}
}
If call this with Inte, it should return all these classes and java.lang.Object, but now it won't return Abst
For example, we have three classes
If call this with
Inte
, it should return all these classes and java.lang.Object, but now it won't returnAbst