a我考网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 161|回复: 0

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

[复制链接]
发表于 2012-8-3 00:09:22 | 显示全部楼层 |阅读模式
16. 数组 pins 的定义如下:" H$ b; K2 {4 G! Y, v
int[ ] pins = new int[4] {9,2,3,1} ;; }, N* _6 u  p' A& k) P( R
则 pins[1] = ( B ) A. 1       B. 2      C.3       D.9
* B1 S8 j, u$ I# V# }) m17.类 Myclass 的定义如下:4 Y# Z; M1 `4 h5 U$ ]& d( {$ b& L1 h
Class myclass
- p+ d" T, n# S  ?1 s{8 f# _9 z" m1 C* B8 ?  x$ ?; G
Int count;  c$ L! c: l9 H
String msg;  G" A/ `; K9 @( G% m
\\\\\\ myclass( b5 h- P+ Z# h
{
/ h6 d3 v$ F1 P! K" q3 l* cInt count;% Q! M# K# S' U2 d2 L( k* V
String msg;}
6 v/ Z% b+ n( b. A2 Q. v6 y}& o0 A- Z& E1 J$ O* B! G* \2 N
则该类的缺省构造函数为:(B)
' H7 ^; z4 y4 ?# {# j0 KA internal myclass()
7 ^1 u% |. }* W: u- f0 cB public myclass(){}( F; F* [  R. F5 a' F  j
C public myclass(){count=0; msg=null}! M1 `8 H9 ]( N# I9 w3 u1 P) e
D 不存在3 [" Z( M' N) v  C0 H4 ]
18.C#类 myclass 定义如下:' P) P1 O; u* O
Public class myclass% ~0 i. x6 ~) g1 G  e
{% T! }6 k% e# W- F
Int count;! [0 G: L+ S! ?3 z- W; {/ f. B
Private myclass(int I){count=I;}+ C. n% |8 j% \$ x
}0 {; E& H+ L, u- ~/ V1 F( R2 u
现在需要为该类添加一个公有的构造函数,则下列函数定义正确的有(D)
9 l2 ~9 q5 C) \1 Z# LA Public myclass(){myclass(100);}  z! ?2 m' q: B/ L. Q% X! |. @7 Z+ q
B public myclass();myclass(100){}
# e6 Q1 @' `3 n, nC public myclass();base(100){}
6 @8 K3 j2 a( E) M7 \D Public myclass();this(100){}
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-6-9 13:22 , Processed in 0.240134 second(s), 22 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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