1
、寫一個(gè)方法實(shí)現(xiàn)下述功能,返回一個(gè)包含某一字符串中所有奇數(shù)位字符的字符串。
??
例如:
ahbhchdheh??
返回結(jié)果
abcde
???????? xaybz???????
返回結(jié)果
xyz
?
2
、數(shù)據(jù)庫(kù)題:有一學(xué)生表
student(student_id,student_name)
和一張圖書(shū)借閱表
books_loaned(student_id,book_number),
請(qǐng)通過(guò)
sql
語(yǔ)句查找出從未借過(guò)一本書(shū)的學(xué)生的列表
(
請(qǐng)使用
not exist
關(guān)鍵字
)
?
3
、
html&javascript
題:請(qǐng)?jiān)谙旅娴?/span>
html
中添加一個(gè)文本輸入框
(age)
和一個(gè)提交按鈕,同時(shí)添加
javascript
判斷:當(dāng)輸入
age
大于
80
時(shí),給出
javascript
提示信息。
<html>
<head>
?
?
?
</head>
<body>
<form name="myform" action="/servlet/myservlet" method="post">
?
?
?
</form>
</body>
</html>
?
servlet
題:
⑴如果沒(méi)有
age
參數(shù)給出,下面的語(yǔ)句會(huì)產(chǎn)生什么結(jié)果
?
<% String s=request.getParameter("age");
?? out.println(s); %>
A.NullpointerException occurs
B.Page compiles but there is no output
c.ServletException occurs
d.null is printed on screen
?
⑵下面方法中哪幾是
servlet
的生命周期方法
()
A.init()
B.initial()
C.service()
D.delete()
E.destrey()
?
XML
題:
⑴結(jié)構(gòu)良好的
XML
和有效的
XML
有什么不同?
⑵
SAX
和
DOM
的主要區(qū)別是什么?
1
、寫一個(gè)方法實(shí)現(xiàn)下述功能,返回一個(gè)包含某一字符串中所有奇數(shù)位字符的字符串。
??
例如:
ahbhchdheh??
返回結(jié)果
abcde
???????? xaybz???????
返回結(jié)果
xyz
public String oddString(String s){
?? if(s==null) throw new NullPointerException();
?? StringBuffer sb=new StringBuffer(s.length()/2+1);
?? int i=0;
?? while(i<s.length()){
????? sb.append(s.chatAt(i));
????? i+=2;
?? }
?? return sb.toString();
}
?
?
2
、數(shù)據(jù)庫(kù)題:有一學(xué)生表
student(student_id,student_name)
和一張圖書(shū)借閱表
books_loaned(student_id,book_number),
請(qǐng)通過(guò)
sql
語(yǔ)句查找出從未借過(guò)一本書(shū)的學(xué)生的列表
(
請(qǐng)使用
not exist
關(guān)鍵字
)
select * from student as temp where not exitst(select temp.student_id from temp,books_loaned where temp.student_id = books_loaned)
為什么要求用
not exist??
根本不需要
?
?
?
3
、
html&javascript
題:請(qǐng)?jiān)谙旅娴?/span>
html
中添加一個(gè)文本輸入框
(age)
和一個(gè)提交按鈕,同時(shí)添加
javascript
判斷:當(dāng)輸入
age
大于
80
時(shí),給出
javascript
提示信息。
<html>
<head>
?
?
?
</head>
<body>
<form name="myform" action="/servlet/myservlet" method="post">
?
?
?
</form>
</body>
</html>
這個(gè)問(wèn)題還是算了
servlet
題:
⑴如果沒(méi)有
age
參數(shù)給出,下面的語(yǔ)句會(huì)產(chǎn)生什么結(jié)果
?
<% String s=request.getParameter("age");
?? out.println(s); %>
A.NullpointerException occurs
B.Page compiles but there is no output
c.ServletException occurs
d.null is printed on screen
?
當(dāng)然是
d
?
⑵下面方法中哪幾是
servlet
的生命周期方法
()
A.init()
B.initial()
C.service()
D.delete()
E.destrey()
a,c,e
XML
題:
⑴結(jié)構(gòu)良好的
XML
和有效的
XML
有什么不同?
不同方面吧
,
有效是語(yǔ)法
,
結(jié)構(gòu)是設(shè)計(jì)
⑵
SAX
和
DOM
的主要區(qū)別是什么?
實(shí)現(xiàn)技術(shù)不一樣
,
我也忘了誰(shuí)是誰(shuí)了
?
1
、寫一個(gè)方法實(shí)現(xiàn)下述功能,返回一個(gè)包含某一字符串中所有奇數(shù)位字符的字符串。
??
例如:
ahbhchdheh??
返回結(jié)果
abcde
< TD>