历史上最小的XMLHttp无刷新JSP聊天室,基本上没有什么功能,此程序只为学习使用无刷新技术者使用。如用问题请与我联系:
本程序由:Qxin开发
E-Mail:lqxttl@21cn.com
考考你(26)
What will be written to the standard output when the following program is run?
class Base {
int i;
Base() {
add(1);
}
void add(int v) {
i += v;
}
void print() {
System.out.println(i);
}
}
class Extension extends Base {
Extension() {
add(2);
}
void add(int v) {
i += v*2;
}
}
public class Qd073 {
public static void main(String args[]) {
bogo(new Extension());
}
static void bogo(Base b) {
b.add(8);
b.print();
}
}
a) 9
b) 18
c) 20
d) 21
e) 22
↑返回目录
前一篇: 访客留言板
后一篇: jsp2.0表达式语言学习资料