a我考网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 95|回复: 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
1 J9 y0 [4 `" E  A, f  1. public class Rid {! r0 C7 }" B5 L/ b& o
  2. public void amethod(int i, String s){}1 T, `% X* l1 u% R, p* e
  3. //Here
3 w  [6 n5 {5 q  4. }
. ~2 i  B0 i% M$ q  a. public void amethod(String s, int i) {}% h( E' ~3 W( W. T
  b. public int amethod(int i, String s) {}) B4 f0 ~4 z9 d5 p0 |  q2 q% D% ^
  c. public void amethod(int i, String mystring) {}$ e7 h. @3 k- \/ Z
  d. public void Amethod(int i, String s) {}
" v4 \. |! X$ Y- s( Z  Q14.Given the following class definition, which of the following statements would be legal after the comment //Here
4 D9 Q3 v3 A: J& e7 |" s  1. class InOut {
/ L' r' a: G5 g% ~) `" V' \! k  2. String s= new String(“Between”);
' G. E- e  P8 f$ ^1 z  3. public void amethod(final int iArgs) {
# n. |) c+ Y% r# D  4. int iam;
/ e; c& k! X) H6 Y: `  5. class Bicycle{1 _% q- C) ]9 H3 J: ]3 ?* @
  6. public void sayHello(){& V% `9 m; K# v4 L. o
  7. //Here; f8 g5 O/ v9 x# X6 `& T7 H
  8. } //End of bicycle class
# [3 e) W6 S4 v1 t; [  9. }3 H1 q/ |: P) f- I
$ \. Y+ u: R& U' [  U  E
  10. } //End of amethod
回复

使用道具 举报

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

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

</p>  11. public void another(){* b: r( V9 G& q0 W# \+ R- P* `7 H
  12. int iOther;. f# _/ n$ q5 x/ Q% Y3 U
  13. }
! z+ S' Z( P* T- I- k  14. }
) C# a2 I, U1 e  }. \" ?' k  a. System.out.println(s);7 X, g$ F) u1 T% M) W; N
  b. System.out.println(iOther);5 C- B: D$ l$ T
  c. System.out.println(iam);7 E% U( g" w9 b: A5 X
  d. System.out.println(iArgs);( `& J. V' f: w
  Q15.Which of the following methods are members of the Vector class and allow you to input a new element
7 A) M/ N6 J! O0 b  a. addElement(). c9 G4 I& S7 `, }0 g
  b. insert()
4 P0 z" |5 M1 H  c. append()1 Z# q8 |, Y8 ]. ^3 T
  d. addItem()* f$ l  U, S% e9 j" @
  13. ad
+ F1 S  U, c5 b. c% v* @% Z  14. ad
8 `3 B. W+ @+ k) Y8 j# s5 m" I  15. a
回复 支持 反对

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-21 08:08 , Processed in 0.239480 second(s), 23 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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