📄 中文java技术网scjp考试题310-025(第二套1)18-147.htm
字号:
<html>
<head>
<title>中文java技术网::SCJP考试题310-025(第二套<1>)18/147</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name='Keywords' content='java SCJP考试题310-025(第二套)18/147 '/>
<meta name='Description' content=' 这都是考试原题,有心人可以收集收集,会让你收益匪浅!因为这一套较多所以我分.....将他罗列出来!18/147意思是这里罗列147里的前18题!!以后的请继续关注!!
310-025
Leading the way in IT testing and certification tools, www.testking.com
Question No: 1
Given:
1. public class test (
2. public static void main (String args[]) {
3. int i = 0xFFFFFFF1;
4. int j = ~i;
5.
6. }
7. )
What is the decimal value of j at line 5?
A. 0
B. 1
C. 14
D. –15
E. An error at line 3 causes compilation to fail.
F. An error at line 4 causes compilation to fail.
Answer: C
Question No: 2
Given:
Integer i = new Integer (42);
Long 1 = new Long (42);
Double d = new Double (42.0);
Which two expressions evaluate to True? (Choose Two)
A. (i ==1)
B. (i == d)
C. (d == 1)
D. (i.equals (d))
E. ......' />
</head>
<LINK href="../css/style.css" rel=STYLESHEET type=text/css>
<body leftmargin="0" link="#00000" topmargin="0" oncontextmenu="return true" bgcolor="#666699">
<table width="98%" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFFFF">
<tr>
<td bgcolor="#000000" align="center">
<script language="JavaScript">
function MM_o(selObj){
window.open(selObj.options[selObj.selectedIndex].value);}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
if(selObj.options[selObj.selectedIndex].value!=''){
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
}
</script>
<table width="760" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" height="84" align="center">
<tr>
<td bgcolor="#000000" rowspan="2"><img src="../images/heard1.jpg" width="110" height="65"></td>
<td rowspan="2" bgcolor="#000000"><img src="../images/heard2.jpg" width="142" height="65"></td>
<td width="615" bgcolor="#000000" bordercolor="0">
<!-- <a href='http://www.cn-java.com/community/' target='_blank'><IMG SRC='http://www.cn-java.com/images/bar.gif' BORDER='0'></a> -->
<div align="center">
<img src=/images/bar.gif>
</div>
</td>
</td>
</tr>
<tr>
<td width="615" bgcolor="#000000" valign="middle" height="17"><a href="http://www.cn-java.com:7001/roller" target='_self'>
<font color="red" size="3" face="Arial, Helvetica, sans-serif"><b>BLOG</b></font></a><font color="#CC9900" size="3" face="Arial, Helvetica, sans-serif">|</font>
<font face="Arial, Helvetica, sans-serif">
<a target='_self' href='../tologin.php'><font color="#FFFFFF" size="2">登录</font></a>
<font color="#CC9900" size="3">|</font><a target='_self' href='../user_step1.php' ><font size="2" color="#FFFFFF">免费注册</font></a><font color="#CC9900" size="3">|</font><font face="Arial, Helvetica, sans-serif"><a href='http://www.actionsoft.com.cn' target='_self'><font size="2" color="#FFFFFF"><b><font color="#ffcc00">炎黄盈动</font></b></font></a></font><font color="#CC9900" size="3"><font color="#CC9900" size="3">|</font></font><font face="Arial, Helvetica, sans-serif"><a href="/javaforum" target="_self"><b><font size="2" color="#ffcc00">论坛</font></b></a><font color="#CC9900" size="3">|</font><font face="Arial, Helvetica, sans-serif"><a href="/opensource" target="_self"><font size="2" color="#FFFFFF">开源项目</font></a><font color="#CC9900" size="3">|</font>
<font face="Arial, Helvetica, sans-serif"><a href="http://www.cn-java.com/index.php" target="_self"><font size="2" color="#FFFFFF">主页</font></a>
</font> </font>
<select class="homepage" onChange="MM_jumpMenu('parent',this,1)" name="select">
<option selected>站点导航</option>
<option value="http://www.cn-java.com">+-首页</option>
<option value="http://www.cn-java.com/community/">+Java社区</option>
<option value="http://www.cn-java.com/opensource/">+开源项目</option>
<option value="http://www.cn-java.com/eshop/">+JAVA图书</option>
<option>+-新手入门</option>
<option value="http://www.cn-java.com/index_focus.php?kind=31&title=配置java环境">|-配置JAVA环境</option>
<option value="http://www.cn-java.com/index_news_kind.php?title=新手入门/JAVA语言基础&kind=32&group=">|-JAVA语言基础</option>
<option value="http://www.cn-java.com/index_download_kind.php?title=开发工具与教程&kind=&group=01">|-开发工具与教程下载</option>
<option value="http://www.cn-java.com/index_download_kind.php?title=程序代码&kind=&group=02">|-程序代码下载</option>
<option value="http://www.cn-java.com/index_news_kind.php?title=新手入门/实用技巧&kind=34">|-实用技巧</option>
<option value="http://www.cn-java.com/index_faq_center.php">|-FAQ abc</option>
<option value="http://www.cn-java.com/index_resource_kind.php">|-学习资源</option>
<option>+专题技术</option>
<option value="http://www.cn-java.com/index_focus.php?kind=12&title=Java线程">|-JAVA线程</option>
<option value="http://www.cn-java.com/index_focus.php?kind=20&title=Socket编程">|-Socket编程</option>
<option value="http://www.cn-java.com/index_focus.php?kind=37&title=应用服务器">|-应用服务器</option>
<option value="http://www.cn-java.com/index_focus.php?kind=38&title=WebService">|-Web
Service</option>
<option value="http://www.cn-java.com/index_focus.php?kind=21&title=J2EE">|-J2EE</option>
<option value="http://www.cn-java.com/index_focus.php?kind=17&title=EJB专题">|-EJB专题</option>
<option value="http://www.cn-java.com/index_focus.php?kind=14&title=JAVA与XML">|-JAVA与XML</option>
<option value="http://www.cn-java.com/index_focus.php?kind=16&title=Servlet与JSP">|-Servlet与JSP</option>
<option value="http://www.cn-java.com/index_focus.php?kind=15&title=Applet与Swing">|-Applet与Swing</option>
<option value="http://www.cn-java.com/index_focus.php?kind=13&title=数据库专题">|-数据库专题</option>
<option value="http://www.cn-java.com/index_focus.php?kind=22&title=JavaMail">|-JavaMail</option>
<option value="http://www.cn-java.com/index_focus.php?kind=18&title=Java智能卡">|-Java智能卡</option>
<option value="http://www.cn-java.com/index_focus.php?kind=35&title=J2ME">|-J2ME</option>
<option value="http://www.cn-java.com/index_focus.php?kind=19&title=WAP应用技术">|-WAP应用技术</option>
<option value="http://www.cn-java.com/index_focus.php?kind=04&title=Java认证考试">|-Java认证考试</option>
<option value="http://www.cn-java.com/index_focus.php?kind=36&title=设计模式">|-设计模式</option>
<option value="http://www.cn-java.com/qikan/list.php">+电子期刊</option>
<option>+会员管理</option>
<option value="http://www.cn-java.com/index_user_center.php">|-会员管理中心</option>
<option value="http://www.cn-java.com/postMain.php">|-我的文章中心</option>
<option value="http://www.cn-java.com/webteam/">|-JWT成员</option>
</select>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table border=0 cellpadding=0 cellspacing=0 bgcolor="#FFFFFF" width="98%" align="center">
<tr>
<td valign=top height="69" align=center> <table border=0 cellpadding=0 cellspacing=0 bgcolor="#FFFFFF" width="100%">
<tr>
<td valign=top height="69">
<table width="95%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="99%">
<td width="1%">
<tr>
<td width="99%"> <br>
<p><font color=#000000 face="宋体,Arial, Helvetica, sans-serif"
size=2> </font><font color=#000000 face="黑体,Arial, Helvetica, sans-serif"
size=4>
SCJP考试题310-025(第二套<1>)18/147 </font>
<font size=1 color=gray>阅读次数2132</font> <p align='right'>出处 CN-JAVA原创:huiwu917 </p> </p>
<hr noshade>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="86%" valign="top">
这都是考试原题,有心人可以收集收集,会让你收益匪浅!因为这一套较多所以我分<1><2><3><4>.....将他罗列出来!18/147意思是这里罗列147里的前18题!!以后的请继续关注!!<br />
310-025<br />
Leading the way in IT testing and certification tools, www.testking.com<br />
Question No: 1<br />
Given:<br />
1. public class test (<br />
2. public static void main (String args[]) {<br />
3. int i = 0xFFFFFFF1;<br />
4. int j = ~i;<br />
5.<br />
6. }<br />
7. )<br />
What is the decimal value of j at line 5?<br />
A. 0<br />
B. 1<br />
C. 14<br />
D. –15<br />
E. An error at line 3 causes compilation to fail.<br />
F. An error at line 4 causes compilation to fail.<br />
Answer: C<br />
Question No: 2<br />
Given:<br />
Integer i = new Integer (42);<br />
Long 1 = new Long (42);<br />
Double d = new Double (42.0);<br />
Which two expressions evaluate to True? (Choose Two)<br />
A. (i ==1)<br />
B. (i == d)<br />
C. (d == 1)<br />
D. (i.equals (d))<br />
E. (d.equals (i))<br />
F. (i.equals (42))<br />
Answer: D, E<br />
Question No: 3<br />
Exhibit :<br />
1. public class test (<br />
2. private static int j = 0;<br />
3.<br />
4. private static boolean methodB(int k) (<br />
5. j += k;<br />
6. return true;<br />
6. )<br />
7.<br />
8. public static void methodA(int i) {<br />
9. boolean b:<br />
10. b = i < 10 | methodB (4);<br />
11. b = i < 10 || methodB (8);<br />
12. )<br />
13.<br />
14. public static void main (String args[] } (<br />
15. methodA (0);<br />
16. system.out.printIn(j);<br />
17. )<br />
18. )<br />
What is the result?<br />
A. The program prints “0”<br />
B. The program prints “4”<br />
C. The program prints “8”<br />
D. The program prints “12”<br />
E. The code does not complete.<br />
Answer: B<br />
Question No: 4<br />
Given<br />
1. Public class test (<br />
2. Public static void main (String args[]) (<br />
3. System.out.printIn (6 ^ 3);<br />
4. )<br />
5. )<br />
What is the output?<br />
Answer: 5<br />
Question No: 5<br />
Given:<br />
1. public class Foo {<br />
2. public static void main (String [] args) {<br />
3. StringBuffer a = new StringBuffer (“A”);<br />
4. StringBuffer b = new StringBuffer (“B”);<br />
5. operate (a,b);<br />
6. system.out.printIn{a + “,” +b};<br />
7. )<br />
8. static void operate (StringBuffer x, StringBuffer y) {<br />
9. x.append {y};<br />
10. y = x;<br />
11. )<br />
12. }<br />
What is the result?<br />
A. The code compiles and prints “A,B”.<br />
B. The code compiles and prints “A,A”.<br />
C. The code compiles and prints “B,B”.<br />
D. The code compiles and prints “AB,B”.<br />
E. The code compiles and prints “AB,AB”.<br />
F. The code does not compile because “+” cannot be overloaded for StringBuffer.<br />
Answer: D<br />
Question No: 6<br />
Exhibit:<br />
1. Public class test (<br />
2. Public static void stringReplace (String text) (<br />
3. Text = text.replace (‘j’ , ‘i’);<br />
4. )<br />
5.<br />
6. public static void bufferReplace (StringBuffer text) (<br />
7. text = text.append (“C”)<br />
8. )<br />
9.<br />
10. public static void main (String args[]} (<br />
11. String textString = new String (“java”);<br />
12. StringBuffer text BufferString = new StringBuffer (“java”);<br />
13.<br />
14. stringReplace (textString);<br />
15. BufferReplace (textBuffer);<br />
16.<br />
17. System.out.printIn (textString + textBuffer);<br />
18. }<br />
19. )<br />
What is the output?<br />
Answer: JAVAJAVA<br />
Question No: 7<br />
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -