考考你(30)
Given the following code, write a line of code that, when inserted at the indicated location, will make the overriding method in Extension invoke the overridden method in class Base on the current object.
class Base {
public void print() {
System.out.println("base");
}
}
class Extention extends Base {
public void print() {
System.out.println("extension");
// insert line of implementation here
}
}
public class Q294d {
public static void main(String args[]) {
Extention ext = new Extention();
ext.print();
}
}
Fill in a single line of implementation.
点击查看答案
</td> </tr> <tr> <td height="25" colspan="2" valign="top" class="ArticleTeitle">
↑返回目录
前一篇: jive汉化版jdom2.5源码
后一篇: 一个多线程的经典例子(转载)