⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 中文java技术网scjp考试题310-025(第二套2)18-50-147.htm

📁 这是多次JAVA考试试题或模拟试题集锦
💻 HTM
📖 第 1 页 / 共 2 页
字号:
<html>
<head>
<title>中文java技术网::SCJP考试题310-025(第二套<2>)18-50/147</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name='Keywords' content='java SCJP考试题310-025(第二套)18-50/147 '/>
<meta name='Description' content='    我在网上见到很多关于SCJP考试的说法,很多人说他简单!确实是这样的!但是这种说法只是当你拿到拿仅有的一套题的时候,你可以这样说!有人说他考的相当全面,确实是这样的,当你看到这一两百套题给你的时候,你就会有此感悟!呵呵!头晕啊!它考的好多地方都是你在看资料的时候不留心的地方你得不时的翻箱倒柜的找资料!这第2套题有147道题,你可以将它收集起来!当你留心看的时候,你的心就宛如一团乱麻,天那,这考的什么?想学真本事,就静下心,仔细研究吧!!!这是18-50题!
310-025
Leading the way in IT testing and certification tools, www.testking.com
Question No 19
Given:
8. int index = 1;
9. boolean[] test = new Boolean[3];
10. boolean foo= test [index];
What is the result?
A. Foo has the value of 0.
B. Foo has the value of null.
C. Foo has the value of true.
D. Foo has the value of false.
E. An exception is thrown.
F. The......' />

</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>&nbsp;</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语言基础&amp;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(第二套<2>)18-50/147                          </font> 
                          <font size=1 color=gray>阅读次数1709</font>                          <p align='right'>出处 CN-JAVA原创:huiwu917&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>                        </p>
						<hr noshade>
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                          <tr> 
                            <td width="86%" valign="top"> 
                                  我在网上见到很多关于SCJP考试的说法,很多人说他简单!确实是这样的!但是这种说法只是当你拿到拿仅有的一套题的时候,你可以这样说!有人说他考的相当全面,确实是这样的,当你看到这一两百套题给你的时候,你就会有此感悟!呵呵!头晕啊!它考的好多地方都是你在看资料的时候不留心的地方你得不时的翻箱倒柜的找资料!这第2套题有147道题,你可以将它收集起来!当你留心看的时候,你的心就宛如一团乱麻,天那,这考的什么?想学真本事,就静下心,仔细研究吧!!!这是18-50题!<br />
310-025<br />
Leading the way in IT testing and certification tools, www.testking.com<br />
Question No 19<br />
Given:<br />
8. int index = 1;<br />
9. boolean[] test = new Boolean[3];<br />
10. boolean foo= test [index];<br />
What is the result?<br />
A. Foo has the value of 0.<br />
B. Foo has the value of null.<br />
C. Foo has the value of true.<br />
D. Foo has the value of false.<br />
E. An exception is thrown.<br />
F. The code will not compile.<br />
Answer: D<br />
Question No 20<br />
Given:<br />
1. public class test(<br />
2. public static void main(string[]args){<br />
3. string foo = args [1];<br />
4. string foo = args [2];<br />
5. string foo = args [3];<br />
6. }<br />
7. }<br />
And command line invocation:<br />
Java Test red green blue<br />
What is the result?<br />
A. Baz has the value of “”<br />
B. Baz has the value of null<br />
C. Baz has the value of “red”<br />
D. Baz has the value of “blue”<br />
E. Bax has the value of “green”<br />
F. The code does not compile.<br />
G. The program throws an exception.<br />
Answer: G<br />
Question No 21<br />
Given:<br />
8. int index = 1;<br />
9. int [] foo = new int [3];<br />
10.int bar = foo [index];<br />
11.int baz = bar + index;<br />
What is the result?<br />
A. Baz has the value of 0<br />
B. Baz has the value of 1<br />
C. Baz has the value of 2<br />
D. An exception is thrown.<br />
E. The code will not compile.<br />
Answer: B<br />
Question No 22<br />
Given:<br />
1. public class foo {<br />
2. public static void main (String[]args) {<br />
3. String s;<br />
4. system.out.printIn (“s=” + s);<br />
5. }<br />
6. }<br />
What is the result?<br />
A. The code compiles and “s=” is printed.<br />
B. The code compiles and “s=null” is printed.<br />
C. The code does not compile because string s is not initialized.<br />
D. The code does not compile because string s cannot be referenced.<br />
E. The code compiles, but a NullPointerException is thrown when toString is called.<br />
Answer: C<br />
Question No 23<br />
Which will declare a method that forces a subclass to implement it?<br />
A. Public double methoda();<br />
B. Static void methoda (double d1) {}<br />
C. Public native double methoda();<br />
D. Abstract public void methoda();<br />
E. Protected void methoda (double d1){}<br />
Answer: D<br />
Question No 24<br />
You want subclasses in any package to have access to members of a superclass. Which is the most<br />
restrictive access modifier that will accomplish this objective?<br />
A. Public<br />
B. Private<br />
C. Protected<br />
D. Transient<br />
E. No access modifier is qualified<br />
Answer: C<br />
Question No 25<br />
Given:<br />
1. abstract class abstrctIt {<br />
2. abstract float getFloat ();<br />
3. )<br />
4. public class AbstractTest extends AbstractIt {<br />
5. private float f1= 1.0f;<br />
6. private float getFloat () {return f1;}<br />
7. }<br />
What is the result?<br />
A. Compilation is successful.<br />
B. An error on line 6 causes a runtime failure.<br />
C. An error at line 6 causes compilation to fail.<br />
D. An error at line 2 causes compilation to fail.<br />
Answer: C<br />
Question No 26<br />
Exhibit:<br />
1. public class test(<br />
2. public int aMethod()[<br />
3. static int i=0;<br />
4. i++;<br />
5. return I;<br />
6. )<br />
7. public static void main (String args[]){<br />
8. test test = new test();<br />
9. test.aMethod();<br />
10.int j = test.aMethod();<br />
11.System.out.printIn(j);<br />
12.]<br />
13.}<br />
What is the result?<br />
A. Compilation will fail.<br />
B. Compilation will succeed and the program will print “0”<br />
C. Compilation will succeed and the program will print “1”<br />
D. Compilation will succeed and the program will print “2”<br />
Answer: D<br />
Question No 27<br />
Given:<br />
1. class super {<br />
2. public float getNum() {return 3.0f;}<br />
3. )<br />
4.<br />
5. public class Sub extends Super {<br />
6.<br />
7. )<br />
Which method, placed at line 6, will cause a compiler error?<br />
A. Public float getNum() {return 4.0f; }<br />
B. Public void getNum () { }<br />
C. Public void getNum (double d) { }<br />
D. Public double getNum (float d) {retrun 4.0f; }<br />
Answer: B<br />
Question No 28<br />
Which declaration prevents creating a subclass of an outer class?<br />
A. Static class FooBar{}<br />
B. Private class FooBar{}<br />
C. Abstract public class FooBar{}<br />
D. Final public class FooBar{}<br />
E. Final abstract class FooBar{}<br />
Answer: D<br />
Question No 29<br />
Given:<br />
1. byte [] arry1, array2[];<br />
2. byte array3 [][];<br />
3. byte[][] array4;<br />
If each array has been initialized, which statement will cause a compiler error?<br />
A. Array2 = array1;<br />
B. Array2 = array3;<br />
C. Array2 = array4;<br />
D. Both A and B<br />
E. Both A and C<br />
F. Both B and C<br />
Answer: F<br />
Question No 30<br />
Exhibit:<br />
1. class super (<br />
2. public int I = 0;<br />
3.<br />
4. public super (string text) (<br />
5. I = 1<br />
6. )<br />
7. )<br />
8.<br />
9. public class sub extends super (<br />
10. public sub (string text) (<br />
11. i= 2<br />
12. )<br />
13.<br />
14. public static void main (straing args[]) (<br />
15. sub sub = new sub (“Hello”);<br />
16. system.out. PrintIn(sub.i);<br />
17. )<br />
18. )<br />
What is the result?<br />
A. Compilation will fail.<br />
B. Compilation will succeed and the program will print “0”<br />
C. Compilation will succeed and the program will print “1”<br />
D. Compilation will succeed and the program will print “2”<br />
Answer: A<br />
Question No 31<br />
Given:<br />
1. public class returnIt (<br />
2. returnType methodA(byte x, double y) (<br />
3. return (short) x/y * 2;<br />
4. )<br />
5. )<br />
What is the valid returnType for methodA in line 2?<br />
A. Int<br />
B. Byte<br />
C. Long<br />
D. Short<br />
E. Float<br />
F. Double<br />
Answer: F<br />
Question No 32<br />
Given the ActionEvent, which method allows you to identify the affected component?<br />
A. GetClass.<br />
B. GetTarget.<br />
C. GetSource.<br />
D. GetComponent.<br />
E. GetTargetComponent.<br />
Answer: C<br />
Question No 33<br />

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -