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

📄 scjp-1.htm

📁 详细介绍scjp考试指南包括基础语法和文件读取
💻 HTM
📖 第 1 页 / 共 5 页
字号:
<html>

<head> 
<meta name="description" CONTENT="Site with information on Java, Sun, Certification, free, mock, practice, exams, exam, test, tests, questions, tutorials, SCJP, SCJP2, HTML, ASP, Visual Basic, JavaScript, SQL, XML. Find tutorials, downloads, Salary Survey">
<meta name="keywords" CONTENT="Java, Sun, Certification, free, mock, practice, exams, exam, test, tests, questions, tutorials, SCJP, SCJP2, 310-025 information, online, EJB, download, letter, job, books, answer, Sylvan, Prometric, internet, best, sample, Reference, JavaBeans, HTML, ASP, Visual Basic, JavaScript, VBScript, SQL, XML, Bruce, Eckel, MindQ, CERTIFIED, business, score, Khalid, Azim, Mughal, Rolf, Rasmussen, software, computer, money, products, training, CORBA, e-commerce, employment, study, tips, compare, tutorial, course, seminar, cars, mockexams, javaquestions, jxam, multiple, choice, certify, FAQ, SCJP2,  SCJD, SCJA, prepare, programmer, developer, groups, preparation, JNDI, scripts, code, database, Applet, Servlets, JSP, Swing, AWT, Web, javacertification">
<title>Levteck.com, Java(TM), Sun, Certification, free, mock, practice, exams, exam, test, tests, questions, tutorials, SCJP, SCJP2, 310-025</title> 
<link href="../menuStyle.css" rel="Stylesheet" type="text/css">
<link href="../mainStyle.css" rel="Stylesheet" type="text/css">
</head>

<body> 

<a name = "Top"></a> <!-- This is a Reference Tag, or Anchor -->

<div align = "Center">
<marquee behavior=scroll>
  <a href="http://www.aqinnovations.com/WholesaleDB/WholesaleDB.asp">
    <font size="+1">
      <b>
        Looking for Distributors, Suppliers, or Wholesale merchandise for your store or e-commerce web site? Click here.
      </b>
    </font>
  </a>
</marquee>
</div>

<!-- This is the orange top bar menu Section -->
<table border="0" cellspacing="0" cellpadding="2" width ="100%">
<tr> <td class="TopMenu" width="100%">
		<a href="../default.htm"><img src="../img/LevteckLogonew.gif" align="Left" alt="Levteck.com" border = "0" width="243" height="62"></a>
	 </td>
</tr>
<tr>
 	 <td class="TopMenu" bgcolor="#FF9900" align="center" width="100%" ,>
		<a class="TopMenu" href="../default.htm" Title="Go back to Home Page">Home</a> |		
		<a class="TopMenu" href="../JavaCertBooks/JavaCertBooks.htm" Title="Links to Java Certification Books">Cert Books</a>
	 </td>
<tr>
</table>

>
<a href="../default.htm"><font size="-2"><b>Home</b></font></a>
>
<a href="../MockExams/Test70Qtns.htm"><font size="-2"><b>Java Test</b></font></a>

<table border="0" cellspacing="0" cellpadding="20" width ="100%">
<!-- This is the blue side bar menu Section (1st column)-->
<tr> <td class="leftBlueSideBar" valign="top" width = "15%">
		<BR>
		<b>	Java Test </b><br><br>
     70 Questions<br>
		<BR><BR>
     </td>
     
<!-- This is the "main info Section" (2nd column) -->
     <td class="middleCodeforTests" valign="top" width = "65%" > 


<TABLE cellSpacing=0 cellPadding=0 width=710 border=0>
  <TBODY>
  <TR vAlign=top align=left>
    <TD></TD>
    <TD width=475>
      <P><FONT color=#b00000><B>Sun Certified Programmer Practice Exam<B></FONT><FONT color=#b00000></FONT>
      <P>Source: ?</P>
      <P>
      <P><B><FONT face=Arial color=#000000>Questions</FONT></B></FONT>
      <P><FONT color=#b00000></FONT><B><A name=no1>Question 1</A></B>: Which of 
      the following class definitions defines a legal <FONT 
      face=Courier>abstract</FONT> class? 
      <P>Select all right answers. 
      <P>a) &nbsp; 
      <TABLE width="100%" border=1>
        <TBODY>
        <TR>
          <TD vAlign=center><FONT face=Courier>class Animal {</FONT> 
            <DIR><FONT face=Courier>abstract void growl();</FONT></DIR><FONT 
            face=Courier>}</FONT></TD></TR></TBODY></TABLE>&nbsp; 
      <P>b) &nbsp; 
      <TABLE width="100%" border=1>
        <TBODY>
        <TR>
          <TD vAlign=center><FONT face=Courier>abstract Animal {</FONT> 
            <DIR><FONT face=Courier>abstract void growl();</FONT></DIR><FONT 
            face=Courier>}</FONT></TD></TR></TBODY></TABLE>&nbsp; 
      <P>c) &nbsp; 
      <TABLE width="100%" border=1>
        <TBODY>
        <TR>
          <TD vAlign=center><FONT face=Courier>class abstract Animal {</FONT> 
            <DIR><FONT face=Courier>abstract void growl();</FONT></DIR><FONT 
            face=Courier>}</FONT></TD></TR></TBODY></TABLE>&nbsp; 
      <P>d) &nbsp; 
      <TABLE width="100%" border=1>
        <TBODY>
        <TR>
          <TD vAlign=center><FONT face=Courier>abstract class Animal {</FONT> 
            <DIR><FONT face=Courier>abstract void growl();</FONT></DIR><FONT 
            face=Courier>}</FONT></TD></TR></TBODY></TABLE>&nbsp; 
      <P>e) &nbsp; 
      <TABLE width="100%" border=1>
        <TBODY>
        <TR>
          <TD vAlign=center><FONT face=Courier>abstract class Animal {</FONT> 
            <DIR><FONT face=Courier>abstract void growl() {</FONT> 
            <DIR><FONT 
            face=Courier>System.out.println("growl");</FONT></DIR><FONT 
            face=Courier>}</FONT></DIR><FONT 
      face=Courier>}</FONT></TD></TR></TBODY></TABLE>
      <P>
      <P><B>Question 2</B>: For an object to be a target for a Thread, that 
      object must be of type: 
      <P>Fill in the blank. 
      <TABLE width="100%" border=1>
        <TBODY>
        <TR>
          <TD vAlign=center>&nbsp;</TD></TR></TBODY></TABLE>
      <P>
      <P><B>Question 3</B>: What is the proper way of defining a class named Key 
      so that it cannot be subclassed? 
      <P>a) &nbsp; 
      <TABLE width="100%" border=1>
        <TBODY>
        <TR>
          <TD vAlign=center><FONT face=Courier>class Key { 
        }</FONT></TD></TR></TBODY></TABLE>&nbsp; 
      <P>b) &nbsp; 
      <TABLE width="100%" border=1>
        <TBODY>
        <TR>
          <TD vAlign=center><FONT face=Courier>abstract final class Key { 
            }</FONT></TD></TR></TBODY></TABLE>&nbsp; 
      <P>c) &nbsp; 
      <TABLE width="100%" border=1>
        <TBODY>
        <TR>
          <TD vAlign=center><FONT face=Courier>native class Key { 
        }</FONT></TD></TR></TBODY></TABLE>&nbsp; 
      <P>d) &nbsp; 
      <TABLE width="100%" border=1>
        <TBODY>
        <TR>
          <TD vAlign=center><FONT face=Courier>class Key {</FONT> 
            <DIR><FONT face=Courier>final;</FONT></DIR><FONT 
            face=Courier>}</FONT></TD></TR></TBODY></TABLE>&nbsp; 
      <P>e) &nbsp; 
      <TABLE width="100%" border=1>
        <TBODY>
        <TR>
          <TD vAlign=center><FONT face=Courier>final class Key { 
        }</FONT></TD></TR></TBODY></TABLE>
      <P><B>Question 4</B>: What modes are legal for creating a new 
      RandomAccessFile object? 
      <P>Select all valid answers. 
      <OL type=a>
        <LI>"w" 
        <LI>"r" 
        <LI>"x" 
        <LI>"rw" 
        <LI>"xrw" </LI></OL>&nbsp; 
      <P><B>Question 5</B>: Given the following code: 
      <TABLE width="100%" border=1>
        <TBODY>
        <TR>
          <TD vAlign=center><FONT face=Courier>class Tester {</FONT> 
            <DIR><FONT face=Courier>public static void main(String[] args) 
            {</FONT> 
            <DIR><FONT face=Courier>CellPhone cell = new CellPhone();</FONT> 
            <P><FONT face=Courier>cell.emergency();</FONT></P></DIR><FONT 
            face=Courier>}</FONT></DIR><FONT face=Courier>}</FONT> 
            <P><FONT face=Courier></FONT> 
            <P><FONT face=Courier>class Phone {</FONT> 
            <DIR><FONT face=Courier>final void dial911() {</FONT> 
            <DIR><FONT face=Courier>// code to dial 911 here . . 
            ..</FONT></DIR><FONT face=Courier>}</FONT></DIR><FONT 
            face=Courier>}</FONT> 
            <P><FONT face=Courier></FONT> 
            <P><FONT face=Courier>class CellPhone extends Phone {</FONT> 
            <DIR><FONT face=Courier>void emegency() {</FONT> 
            <DIR><FONT face=Courier>dial911();</FONT></DIR><FONT 
            face=Courier>}</FONT></DIR><FONT 
      face=Courier>}</FONT></TD></TR></TBODY></TABLE>What will happen when you 
      try to compile and run the Tester class? 
      <OL type=a>
        <LI>The code will not compile because Phone is not also declared as 
        <FONT face=Courier>final</FONT>. 
        <LI>The code will not compile because you cannot invoke a <FONT 
        face=Courier>final</FONT> method from a subclass. 
        <LI>The code will compile and run fine. 
        <LI>The code will compile but will throw a NoSuchMethodException when 
        Tester is run. 
        <LI>Phone and CellPhone are fine, but Tester will not compile because it 
        cannot create an instance of a class that derives from a class defining 
        a <FONT face=Courier>final </FONT>method. </LI></OL>
      <P><B>Question 6</B>: Which assignments are legal? 
      <P>Select all valid answers. 
      <OL type=a>
        <LI><FONT face=Courier>long test = 012; 
        <LI>float f = -412; 
        <LI>int other = (int)true; 
        <LI>double d = 0x12345678; 
        <LI>short s = 10;</FONT> </LI></OL>&nbsp; 
      <P><B>Question 7</B>: Given this class definitions: 
      <TABLE width="100%" border=1>
        <TBODY>
        <TR>
          <TD vAlign=center><FONT face=Courier>abstract class Transaction 
            implements Runnable { }</FONT> 
            <P><FONT face=Courier></FONT> 
            <P><FONT face=Courier>class Deposit extends Transaction {</FONT> 
            <DIR><FONT face=Courier>protected void process() {</FONT> 
            <DIR><FONT face=Courier>addAmount();</FONT></DIR><FONT 
            face=Courier>}</FONT> 
            <P><FONT face=Courier>void undo(int i) {</FONT> 
            <DIR><FONT 
            face=Courier>System.out.println("Undo");</FONT></DIR><FONT 
            face=Courier>}</FONT></DIR><FONT 
      face=Courier>}</FONT></TD></TR></TBODY></TABLE>What will happen if we 
      attempted to compile the code? 
      <P>Select the one right answer. 
      <OL type=a>
        <LI>This code will not compile because the parameter <FONT 
        face=Courier>i</FONT> is not used in <FONT face=Courier>undo()</FONT>. 
        <LI>This code will not compile because there is no <FONT 
        face=Courier>main()</FONT> method. 
        <LI>This code will not compile because Deposit must be an <FONT 
        face=Courier>abstract</FONT> class. 
        <LI>This code will not compile because Deposit is not declared <FONT 
        face=Courier>public</FONT>. 
        <LI>Everything will compile fine. </LI></OL>
      <P><B>Question 8</B>: Which exception might <FONT 
      face=Courier>wait()</FONT> throw? 
      <P>Fill in the blank. 
      <TABLE width="100%" border=1>
        <TBODY>
        <TR>
          <TD vAlign=center>&nbsp;</TD></TR></TBODY></TABLE>&nbsp; 
      <P><B>Question 9</B>: Which of the following are not Java keywords: 
      <TABLE cellSpacing=0 cellPadding=7 width="100%" border=1>
        <TBODY>
        <TR>
          <TD vAlign=top width="13%"><FONT face=Courier>abstract</FONT></TD>
          <TD vAlign=top width="13%"><FONT face=Courier>double</FONT></TD>
          <TD vAlign=top width="13%"><FONT face=Courier>int</FONT></TD>
          <TD vAlign=top width="13%"><FONT face=Courier>static</FONT></TD></TR>
        <TR>
          <TD vAlign=top width="13%"><FONT face=Courier>boolean</FONT></TD>
          <TD vAlign=top width="13%"><FONT face=Courier>else</FONT></TD>
          <TD vAlign=top width="13%"><FONT face=Courier>interface</FONT></TD>
          <TD vAlign=top width="13%"><FONT face=Courier>super</FONT></TD></TR>
        <TR>
          <TD vAlign=top width="13%"><FONT face=Courier>break</FONT></TD>
          <TD vAlign=top width="13%"><FONT face=Courier>extends</FONT></TD>
          <TD vAlign=top width="13%"><FONT face=Courier>long</FONT></TD>
          <TD vAlign=top width="13%"><FONT 
face=Courier>superclass</FONT></TD></TR>
        <TR>
          <TD vAlign=top width="13%"><FONT face=Courier>byte</FONT></TD>
          <TD vAlign=top width="13%"><FONT face=Courier>final</FONT></TD>
          <TD vAlign=top width="13%"><FONT face=Courier>native</FONT></TD>
          <TD vAlign=top width="13%"><FONT face=Courier>switch</FONT></TD></TR>
        <TR>
          <TD vAlign=top width="13%"><FONT face=Courier>case</FONT></TD>
          <TD vAlign=top width="13%"><FONT face=Courier>finally</FONT></TD>
          <TD vAlign=top width="13%"><FONT face=Courier>new</FONT></TD>
          <TD vAlign=top width="13%"><FONT 
        face=Courier>synchronized</FONT></TD></TR>
        <TR>
          <TD vAlign=top width="13%"><FONT face=Courier>catch</FONT></TD>
          <TD vAlign=top width="13%"><FONT face=Courier>float</FONT></TD>
          <TD vAlign=top width="13%"><FONT face=Courier>null</FONT></TD>
          <TD vAlign=top width="13%"><FONT face=Courier>this</FONT></TD></TR>
        <TR>
          <TD vAlign=top width="13%"><FONT face=Courier>char</FONT></TD>
          <TD vAlign=top width="13%"><FONT face=Courier>for</FONT></TD>
          <TD vAlign=top width="13%"><FONT face=Courier>open</FONT></TD>
          <TD vAlign=top width="13%"><FONT face=Courier>throw</FONT></TD></TR>
        <TR>
          <TD vAlign=top width="13%"><FONT face=Courier>class</FONT></TD>

⌨️ 快捷键说明

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