a我考网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 96|回复: 1

[考试试题] 2011年JAVA认证模拟题第二阶段(5)

[复制链接]
发表于 2012-8-4 12:33:16 | 显示全部楼层 |阅读模式
  Q13.Given the following class definition, which of the following methods could be legally placed after the comment //Here: V1 T* E, P  ~, Y+ Z9 h0 S
  1. public class Rid {
5 H2 R! X8 M' [2 \  2. public void amethod(int i, String s){}( `6 R' J- ~* @) O
  3. //Here! f7 w3 S% b/ m- D4 I; E. f6 o7 ~9 C
  4. }
& }# ?1 A# ^! x' G9 ^  a. public void amethod(String s, int i) {}5 ~6 d3 ]: N( g( [  |$ n0 R0 `
  b. public int amethod(int i, String s) {}' {. C& H7 W7 L. x' y, a9 M
  c. public void amethod(int i, String mystring) {}6 w* Z/ a' H3 `2 |# X/ _6 @
  d. public void Amethod(int i, String s) {}; `, p0 Y# f9 F9 ?$ H
  Q14.Given the following class definition, which of the following statements would be legal after the comment //Here
" _6 x0 \" A+ d+ J. i( F# ]' |  1. class InOut {
+ n: b1 h8 V- ~$ _0 ]1 M  2. String s= new String(“Between”);0 x6 K- i  ?# ?/ e6 x( p
  3. public void amethod(final int iArgs) {
) A& u0 u- k: ~5 N- [, M  4. int iam;( H, y% H7 E, P+ a3 G
  5. class Bicycle{
" J  h. I1 u: X# s  6. public void sayHello(){
5 b1 r, w: e) Z, b- n* p( C$ o% i+ h  7. //Here1 j0 d+ |% E# D3 V4 O
  8. } //End of bicycle class4 T/ K5 }7 s( V3 U- u
  9. }* G& e- g- O7 h2 _9 o" \
. S" `0 y1 D+ y& R1 o: y* V
  10. } //End of amethod
回复

使用道具 举报

 楼主| 发表于 2012-8-4 12:33:17 | 显示全部楼层

2011年JAVA认证模拟题第二阶段(5)

</p>  11. public void another(){
7 g. I5 |. J' P7 z) L$ J2 O8 q  12. int iOther;" X# t9 w/ Y. J
  13. }
: b9 k8 A: V# j* w- K. R9 T  14. }' y9 y, }9 G/ p+ V6 B1 {- y
  a. System.out.println(s);0 {& \0 a- w9 N' B4 m. `1 q& J0 S
  b. System.out.println(iOther);1 q7 }) R  g9 W6 D( r2 S# h: X( _
  c. System.out.println(iam);  a' R, D- K, I/ q- u) _
  d. System.out.println(iArgs);' ]0 b. L5 K8 W7 o# e. u! a) A; q
  Q15.Which of the following methods are members of the Vector class and allow you to input a new element, D7 A7 }1 p7 i0 u
  a. addElement()- g: m% Q0 [) z+ l
  b. insert()
$ E6 `8 q8 ?# a2 @) \  c. append()
/ O8 ~5 D0 j9 ?0 w, R% F4 K0 z  d. addItem()
% _' O% q, _. _6 V  13. ad
4 P) P2 d6 a/ [7 X( f9 o  14. ad# v2 t6 S' o' F6 U
  15. a
回复 支持 反对

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-6-2 12:29 , Processed in 0.485579 second(s), 24 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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