📄 66-76.htm
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<Meta http-equiv="Pragma" Content="No-cach">
<title>Java程序员认证模拟题及详细分析(4) -- 最大的IT资源网</title>
<link href="/img/P5-06-css.css" rel="stylesheet" type="text/css">
</head>
<script language="JavaScript">
function GetContentWnd(){ return parent; }
function OnSave(){
var oWnd = GetContentWnd();
window.external.addFavorite(
oWnd.location.href, oWnd.document.title );
}
//双击鼠标滚动屏幕的代码
var currentpos,timer;
function initialize()
{
timer=setInterval ("scrollwindow()",80);
}
function sc()
{
clearInterval(timer);
}
function scrollwindow()
{
currentpos=document.body.scrollTop;
window.scroll(0,++currentpos);
if (currentpos !=document.body.scrollTop)
sc();
}
document.onmousedown=sc
document.ondblclick=initialize
</script>
<Script LANGUAGE="JavaScript">
if(self!=top){top.location=self.location;}
</script>
<body oncontextmenu="return false;" onload="setimg();">
<table width="750" border="0" align="center" cellpadding="0"
cellspacing="0">
<tr>
<td height="26" valign="top"><table width="100%" border="0"
cellpadding="0" cellspacing="0">
<tr>
<td height="22" align="center"><script src="/js/P5-head.js"></script></td>
</tr>
</table></td>
</tr>
<tr>
<td height="82" align="center" valign="top"
bgcolor="#D2D2D2"><table width="750" border="0" cellpadding="0"
cellspacing="0">
<tr>
<td height="80" align="center" bgcolor="#FFFFFF"><script src="/ad/k15-5-1.js"></script></td>
</tr>
</table></td>
</tr>
<tr>
<td height="30" valign="top"><table width="100%" border="0"
cellpadding="0" cellspacing="0">
<tr>
<td width="85" height="30"><img src="/img/P5-06-01.gif"
width="85" height="30"></td>
<td width="85"><a href="javascript:OnSave();"><img
src="/img/P5-06-02.gif" width="85" height="30" border="0"></a></td>
<td width="8" align="center" valign="top"><img src="/img/P5-06
-03.gif" width="8" height="8"></td>
<td width="8" align="left" valign="bottom"
bgcolor="#F2F2F2"><img src="/img/P5-06-04.gif" width="8"
height="8"></td>
<td width="10" bgcolor="#F2F2F2"> </td>
<td width="418" bgcolor="#F2F2F2"><a href="/">豆豆首页</a> - <a href="http://www.ddvip.net/index.htm">在线教程</a> - <a href="/cert/index.htm">认证考试</a> - <a href="/cert/java/index.htm">JAVA认证</a> - <a href="/cert/java/index3/index.htm">培训资源</a></td>
<td width="136" bgcolor="#F2F2F2"><marquee scrollamount="4">最
大的中文IT资源网
</marquee></td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="100%" border="0" align="left" cellpadding="0"
cellspacing="0">
<tr>
<td valign="top"><table width="100%" border="0"
cellpadding="0" cellspacing="0">
<tr>
<td align="center"> </td>
<td width="20" rowspan="2"> </td>
</tr>
<tr>
<td height="50" align="center" style="border-bottom:1px
dashed #666666"><strong class="f16">Java程序员认证模拟题及详细分析(4)</strong></td>
</tr>
<tr>
<td height="40" align="center"> 作者:unknown 更新时间:
2005-03-22 </td>
<td rowspan="6" valign="top" style="border-right:1px solid
#666666"> </td>
</tr>
<tr>
<td height="40"> </td>
</tr>
<tr>
<td><table width="100%" border="0" cellpadding="0"
cellspacing="0" class="pagefont">
<tr>
<td><p class="line-height"><br>
<span class="header">续:Java程序员认证模拟题及详细分析(1) 和(2) (3)</span><br>
66. Given the following class outline: <br>
class Example{ <br>
private int x; <br>
// rest of class body <br>
public static void main(String args[]){ <br>
//implementation of main mehtod} <br>
} <br>
Which statement is true? <br>
A. x=2 is a valid assignment in the main() method of class Example. <br>
B. Changing private int x to int x would make x=2 a valid assignment in the main() method of class Example. <br>
C. Changing private int x to public int x would make x=2 a valid assignment in the main() method of class Example. <br>
D. Changing private int x to static int x would make x=2 a valid assignment in the main() method of class Example. <br>
E. Changing class Example to public class Example would make x=2 a valid assignment in the main() method of class Example. <br>
<br>
67. Which statement is true about an inner class? <br>
A. It must be anonymous <br>
B. It can not implement an interface <br>
C. It is only accessible in the enclosing class <br>
D. It can access any final variables in any enclosing scope. <br>
<br>
68. Which statement is true about the grid bag layout manager? <br>
A. The number of rows and columns is fixed when the container is created. <br>
B. The number of rows and columns is fixed when the GridBagLayout object is created. <br>
C. If a component has a fill value of BOTH, then as the container change size, the component is resized. <br>
D. Every component must carry a non-zero weightx and weighty value when it is added to the container <br>
E. If a row has a weighty value that is non-zero, then as the container changes height, the row changes height. <br>
<br>
69. Which statement are true about writing a class that is to handle the events issued by a user interface component. <br>
A. Subclassing an adapter is inappropriate in this case. <br>
B. The class should implement some listener interface <br>
C. A class can implement multiple listener interfaces if desired. <br>
D. A subclass of an AWT component cannot listen to its own events. <br>
E. When implements listener interface, a class need only provide those handler methods that it chooses. <br>
<br>
70.The argument for a class?s main() method is called args, and the class is invoked as follows. <br>
java Example cat <br>
What would be the effect of trying to access args[0] in the main method? <br>
A. The value produced is cat <br>
B. The value produced is java <br>
C. The value produced is Example <br>
D. An object of type NullPointerException is thrown. <br>
E. An object of type ArrayIndexOutofBoundsException is thrown. <br>
71. Which best describes the requirements of a fully encapsulated class? <br>
A. Mehtods must not be private. <br>
B. Variables must not be public. <br>
C. The class must be marked final <br>
D. Public methods are all marked final. <br>
E. Modification of the objects state is only possible using method calls. <br>
<br>
72.Which contains objects without ordering, duplication, or any particular lookup/retrieval mechanism? <br>
A. Map <br>
B. Set <br>
C. List <br>
D. Collection <br>
E. Enumeration <br>
<br>
73.What might cause the current thread to stop executing? <br>
A. An interrupted exception is thrown. <br>
B. The thread execute a sleep() call. <br>
C. The thread constructs a new thread <br>
D. A thread of higher priority becomes ready <br>
E. The thread executes a read() call on InputStream <br>
<br>
74.Which statements are true about threads? <br>
A. Threads created from the same class all finish together. <br>
B. A thread can be created only by subclassing java.lang.Thread. <br>
C. Invoking the suspend() method stops a thread so that it cannot be restarted. <br>
D. The Java interpreter?s natural exit occurs when no non-daemon threads remain alive. <br>
E. Uncoordinated changes to shared data by multiple threads may result in the data being read, or left, in an inconsistent state. <br>
<br>
75.What might form part of a correct inner class declaration or combined declaration and instantiation? <br>
A. private class C <br>
B. new SimpleInterface(){ <br>
C. new ComplexInterface(x){ <br>
D. private final abstract class( <br>
E. new ComplexClass() implements SimpleInterface <br>
76. Which statements are true about the garbage collection mechanisms? <br>
A. The garbage collection mechanism release memory at pridictable times. <br>
B. A correct program must not depend upon the timing or order of garbage collection <br>
C. Garbage collection ensures that a program will NOT run out of memory during execution <br>
D. The programmer can indicate that a reference through a local variable is no longer going to be used. <br>
E. The programmer has a mechanism that explicitly and immediately frees the memory used by Java objects. <br>
<br>
==================================================== <br>
<br>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -