Article View: cn.bbs.comp.lang.java
Article #22101re: scjp����:����⼰��
From: �˺�2��
Date: Tue, 28 Oct 2003 07:47
Date: Tue, 28 Oct 2003 07:47
110 lines
3028 bytes
3028 bytes
Q65
Given the following code, which method declarations, when inserted at the in
dicated position, will not cause the program to fail compilation?
public class Qdd1f {
public long sum(long a, long b) { return a + b; }
// insert new method declaration here
}
1) public int sum(int a, int b) { return a + b; }
2) public int sum(long a, long b) { return 0; }
3) abstract int sum();
4) private long sum(long a, long b) { return a + b; }
5) public long sum(long a, int b) { return a + b; }
Q66
The 8859-1 character code for the uppercase letter A is 65. Which of these c
ode fragments declare and initialize a variable of type char with this value
?
1) char ch = 65;
2) char ch = '\65';
3) char ch = '\0041';
4) char ch = 'A';
5)char ch = "A";
1) 4
2) 2
3) 2
4) 2, 6
5) 4
6) 3
7) 4
8) 4
9) 1, 2, 3, 5
10) 1, 5
11) 4
12) 5
13) 1
14) "LayoutManager layout = new GridLayout(2, 3);"
or: "LayoutManager layout = new GridLayout(2, 3)"
15) 5
16) 3
17) 2, 4
18) 4, 5
19) 2
20) 4
21) 4
22) 5
23) 1, 2
24) 2
25) 1, 4
26) 3
27) 4
28) 3 (? no run-time exception)
29) 1, 4, 5
30) 5
31) 2, 5
32) 1
33) 3, 4
34) 2, 3
35) 2, 4
36) 3, 5
37) 2, 5
38) 3, 4
39) 1
40) 1, 2, 3
41) "wait"
42) 3
43) 3
44) 5
45) 4
46) 1, 2, 3, 4
47) 2
48) 1, 2, 4
49) 1
50) 2, 3
51) 1, 5
52) 1, 3
53) 1
54) 2, 5
55) 5
56) 2, 3
57) 4
58) 2, 3
59) 5
60) super.print();
61) 4
62) 1
63) 1,2
64) 1,2,5
65) 1,5
66) 1,4
�� �� amou (�˺�2��) �Ĵ������ᵽ: ��
: SCJP Mock Exam 1 ������8941
: ���� ����
: [����JAVA������ 2001-11-30]
: ת�� ����Ŀ�ʹ𰸽����ο�
: Q1
: A method is ...
: 1) an implementation of an abstraction.
: 2) an attribute defining the property of a particular abstraction.
: 3) a category of objects.
: 4) an operation defining the behavior for a particular abstraction.
: .................������ʡ�ԣ�
--
j&= y+ y* jv+ yy-v v &
wE!" j17$T 7MPC NU$E- Ej&v-
O*K^ yHH:Ovm+ UMMk BMNTO: H1="7'
jO&OH: "OH&"E~ U0H1 BB71` jCf'U:
vM1H1 jB-j1 wHhHh*-/$B)B- BkJUk
^HI'OH j""^N1 "OHOK~ H$H"Da jP'N ^
[m[1;31m�� ��Դ:���ɽ��ˮ bbs.neu.edu.cn��[FROM: 219.216.70.42][m
Technical Details
Message-ID:
<4931Ve$Bmy@bbs.neu.edu.cn>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.media.kyoto-u.ac.jp!newsgate.cuhk.edu.hk!news.zixia.net!news.neu.edu.cn!NEUShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,GB X-Google-Thread: f6cb0,936df81f1d70415a,start X-Google-Attributes: gidf6cb0,public X-Google-ArrivalTime: 2003-10-27 23:48:02 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.media.kyoto-u.ac.jp!newsgate.cuhk.edu.hk!news.zixia.net!news.neu.edu.cn!NEU From: amou.bbs@bbs.neu.edu.cn (�˺�2��) Newsgroups: cn.bbs.comp.lang.java Subject: re: scjp����:����⼰�� Date: 28 Oct 2003 07:47:08 GMT Organization: ��ɽ��ˮ Message-ID: <4931Ve$Bmy@bbs.neu.edu.cn> Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 8bit X-Filename: java/M.1067327224.A Lines: 110