您的位置:首页 > 编程语言 > Java开发

java笔试题

2009-07-29 14:05 239 查看
1、请写一段html,完成下列表格的样子。注意:是单线边框。

 
  
  
  
 
<table width="30%" border="1">
<tr>
<td colspan="4">1</td>
</tr>
<tr>
<td rowspan="4">2</td>
<td colspan="3">3</td>
</tr>
<tr>
<td rowspan="3">4</td>
<td colspan="2">5</td>
</tr>
<tr>
<td rowspan="2">6</td>
<td>7</td>
</tr>
<tr>
<td>8</td>
</tr>
</table>


2、字符串“A@B@C@D”,以@字符拆分 返回数组。
String[] array = "A@B@C@D".split("@");


3、字符串String s=”SDsBEaA”,要求最后生成s=”AaBDESs”.

4、有3张表,Student表、SC表和Course表
Student表:学号(Sno)、姓名(Sname)、性别(Ssex)、年龄(Sage)和系名(Sdept)
Course表:课程号(Cno)、课程名(Cname)和学分(Ccredit);
SC表:学号(Sno)、课程号(Cno)和成绩(Grade)
请使用SQL语句查询学生姓名及其课程总学分
(注:如果课程不及格,那么此课程学分为0)

5、请说出这个程序的目的是什么?返回结果是什么?
public Station(URL urla){
try
{
String a="",b="";
InputStream ins = urla.openStream();
BufferedReader bReader = new BufferedReader(new InputStreamReader(ins));
String info = bReader.readLine();
int i=1;
info=bReader.readLine();

while(info!=null){
a=info.substring(0,info.indexOf("@"));
b=info.substring(info.indexOf("@")+1,info.length());

if (i==1){
this.X1=Integer.parseInt(a);
this.Y1=Integer.parseInt(b);
}

if (i==2){
this.X2=Integer.parseInt(a);
this.Y2=Integer.parseInt(b);
}
if (i==3){
this.X3=Integer.parseInt(a);
this.Y3=Integer.parseInt(b);
}
if (i==4){
this.X4=Integer.parseInt(a);
this.Y4=Integer.parseInt(b);
}
i++;
info=bReader.readLine();
}
}
catch(MalformedURLException e){
System.out.println(e);
}
catch(IOException e){
System.out.println(e);
}
}

1、 面向对象的特征有哪些方面
2、 String是最基本的数据类型吗?
3、 运行时异常与一般异常有何异同?
4、 说出ArrayList,Vector, LinkedList的存储性能和特性
......
9、 Collection 和 Collections的区别。
10、 HashMap和Hashtable的区别。
11、 final, finally, finalize的区别。
12、 sleep() 和 wait() 有什么区别?
13、 同步和异步有何异同,在什么情况下分别使用他们?举例说明。
14、 abstract class和interface有什么区别?
......
27、 垃圾回收的优点和原理。并考虑2种回收机制
28、 请说出你所知道的线程同步的方法。
29、 你所知道的集合类都有哪些?主要方法?
30、 多线程有几种实现方法,都是什么?同步有几种实现方法,都是什么?
31、 JSP的内置对象及方法
......
36、 XML文档定义有几种形式?它们之间有何本质区别?解析XML文档有哪几种方式?
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: