1.简述逻辑操作(&,|,^)与条件操作(&&,||)的区别。(15 分)
2.下面程序运行会发生什么结果?如果有错误,如何改正? (15 分)
interface A{
int x = 0;
}
class B{
int x =1;
}
class C
extends B implements A {
public void pX(){
System.out.println(x);
}
public static void main(String[] args) {
new C().pX();
}
}
}
3.简述 Java Server Page 和 Servlet 的联系和区别。(20 分)
4.XML 文档定义有几种形式?它们之间有何本质区别?
解析 XML 文档有哪几种方式?(20 分)
5.简述 synchronized 和 java.util.concurrent.locks.Lock 的异同 ?(15 分)
6.EJB 规范规定 EJB 中禁止的操作有哪些?(15 分)
最后还有一题考考你的眼力:
public String toString(){
return this + "@" + this.hashCode();
}
这个 toString()方法实现有无不当的地方?(toString 方法其实可以按你想输出的任何内容输出一些该类的信
息)
**********************************************************************************
public String toString(){
return this + "@" + this.hashCode();
}
评论1
最新资源