a我考网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 160|回复: 0

[考试试题] 微软认证考试模拟题2(6)

[复制链接]
发表于 2012-8-3 00:09:22 | 显示全部楼层 |阅读模式
16. 数组 pins 的定义如下:% }* b7 P$ h3 o& Z8 U" f
int[ ] pins = new int[4] {9,2,3,1} ;) T) S( R+ J7 m+ E6 r
则 pins[1] = ( B ) A. 1       B. 2      C.3       D.9
1 y, C9 ?' _- B, ^1 F4 y4 I& l17.类 Myclass 的定义如下:
9 Y( ]- X" t0 oClass myclass* p( A" H" }/ ^
{& I% S) I$ d  s
Int count;4 F' z* a/ L! ~4 G8 y$ l3 c
String msg;
7 Q' ?* Q* P- I4 ~1 w1 k\\\\\\ myclass
: Z! S, w) i. ?: c) v8 n9 N{' V; s/ c' z  S  h# W& u1 H6 f
Int count;
7 i) z# z. X0 H" a. g7 j/ eString msg;}
. Q9 U3 D" k& b7 p2 N" F( n+ P" }}
5 Q5 E& d) d8 Y则该类的缺省构造函数为:(B). I- q" D/ w# b. _- }$ |1 \
A internal myclass()& b2 D7 M* _  O1 B
B public myclass(){}6 t7 I. |1 P6 v4 X: i
C public myclass(){count=0; msg=null}" J. O% I) R3 n) j
D 不存在
1 Z3 W3 c% `. v9 A2 Q18.C#类 myclass 定义如下:
; s( `& E% l' f3 m7 j) mPublic class myclass
# z$ Z- w) d- W5 J  k  K  C6 I* B{2 C3 }' }1 A) v( \% t0 r; b
Int count;
# O1 U5 L- o' A* e* |/ NPrivate myclass(int I){count=I;}
* K9 ?- I+ B2 x) W4 y3 Q}
! _  B5 h7 B5 |; x- y现在需要为该类添加一个公有的构造函数,则下列函数定义正确的有(D)% M" A+ U2 k3 k" m
A Public myclass(){myclass(100);}
, T  C5 e3 ]# Q- i3 O0 `3 y* m9 W9 @B public myclass();myclass(100){}8 H: p" Y9 B) Z. t; T
C public myclass();base(100){}' Z' ?6 {  {& V* J
D Public myclass();this(100){}
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Woexam.Com ( 湘ICP备18023104号 )

GMT+8, 2024-5-15 21:52 , Processed in 0.163494 second(s), 21 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表