一、阅读下列程序,写出程序的输出结果 1.1
public static String a(String a){ }
public static String b(String b){ }
public static void main(String args[]){
String a=\"a1\";
String b=\"b1\"; b=b(a);
System.out.println(a); System.out.println(b); b=\"b\"; return b; a=\"a\"; return a;
} 1.2
public class FatherClass { public FatherClass() {
System.out.println(\"FatherClass Create\"); } }
public class ChildClass extends FatherClass { public ChildClass() {
System.out.println(\"ChildClass Create\"); }
public static void main(String[] args) { FatherClass fc = new FatherClass(); ChildClass cc = new ChildClass(); } }
输出的结果是? 1.3
int i = 0;
int j = i++ + ++i; int k = --i + i--;} i,j,k结果是?
二、选填题 2.1
public class Test {
public static void aMethod() throws Exception {
try {
throw new Exception(); } finally {
System.out.println(“finally”);
} }
public static void main(String args[]) {
try {
aMethod();
} catch (Exception e) {
System.out.println(“exception”);
}
System.out.println(“finished”);
} }
What is the result? A. finally B. exception finished C. finally exception finished
D. Compilation fails.
2.2 阅读下面程序,最终输出的结果是___________ public class Test {
public static void main(String[] args){
final long MICROS_PER_DAY = 24 * 60 * 60 * 1000 * 1000; final long MILLIS_PER_DAY = 24 * 60 * 60 * 1000; System.out.println(MICROS_PER_DAY/MILLIS_PER_DAY); } }
A.5; B.24; C.60; D.1000
2.3、符合样式说明的图案是___________
布局:
.red{ width:150px; height:150px; background-color:#ccc;}
.green{ width:50px; height:50px; background-color:#333; margin-top:20px; float:left;}
A B C
2.4、样式表中,改变元素的外边距用___,改变元素的内填充距离用_____,让元素隐藏的语句是_____。
2.5 HTTP403错误是___________
A. 错误请求;B. 禁止访问;C. 文件未找到;D. 内部服务器错误 2.6 改变TOMCAT的访问端口需要修改哪个文件?
A.context.xml; B.server.xml; C.web.xml; D.port.xml 2.7 使用SVN进行版本管理时出现冲突后提示的符号包括什么? A. ~ - +; B. - = *; C. = < >; D. { } -
2.8 下面哪个函数是 public void example(){...} 的重载函数? A.private void example( int m){...} B.public int example(){...} C.public void example2(){...}
D.public int example ( int m, float f){...} 2.9 main方法是Java Application程序执行的入口点,关于main方法的方法头以下哪项是合法的?
A.public static void main()
B.public static void main(String[ ] args) C.public static int main(String[ ] args) D.public void main(String arg[ ])
2.10 以下哪些不是javascript的全局函数() A. eval B. escape C. setTimeout D. parseFloat 四、简答题:
4.1 jsp中forward 和redirect的区别?
4.2 JSP中的内置对象有哪些,作用是什么?
4.3 用java写出单例模式的代码
4.4 请列举一些关于SQL优化的建议。
4.5 开发中常用的工具有哪些?用过的Eclipse插件有哪些?
4.6 项目开发中,遇到问题如何解决,举例说明
五 按下列要求写出sql语句
用户表(User) 用户号(userId ) 用户名(userName)
主题表(Topic) 主题号(topicId) 发贴用户(userId) 主题内容(topicContent)
回贴表(Reply) 回贴号(replyId) 主题号(topicId) 回贴用户(userId) 回贴内容(replyContent)
5.1 查出replayId为100的回贴人用户名
5.2 查出replayId为100的主题的发贴用户名
5.3用一条SQL语句 查询出平均分都大于80分的学生姓名 (表名为table) name kecheng fenshu 张三 语文 81 张三 数学 75 李四 语文 76 李四 数学 90 王五 语文 81 王五 数学 100 王五 英语 90
八 项目题
现在有一个项目,开发一个通用的数据库(mysql或oracle)web查询工具,要求用户可以根据输入的服务器ip,端口,用户名,密码,数据库名后可以查看该数据库的所有表,点击某个表可以查看该表结构以及所有数据;请问假如由你设计的话,你会采用哪些框架和开发模式等java技术,如果由你一个人开发需要多少时间?简述如何实现并列举关键代码或这SQL语句
因篇幅问题不能全部显示,请点此查看更多更全内容