a我考网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 74|回复: 1

[考试试题] java认证试题:Java认证模拟题及分析(5)

[复制链接]
发表于 2012-8-4 12:33:16 | 显示全部楼层 |阅读模式
 question 56)   you are using the gridbaglayout manager to place a series of buttons on a frame. you want to make the size of one of the buttons bigger than the text it contains. which of the following will allow you to do that?
8 h9 G0 \6 r( T, e/ j3 K  1) the gridbaglayout manager does not allow you to do this) w2 M" ^4 s! K) R: A9 b; Z
  2) the setfill method of the gridbaglayout class
) T7 t( w4 s7 P) y  3) the setfill method of the gridbagconstraints class$ a( A9 R! |! P9 _
  4) the fill field of the gridbagconstraints class; C5 J1 F; x3 Z
  answer to question 56, a- W# d) S. h2 l2 I# g7 X0 S
  --------------------------------------------------------------------------------
; X2 O) ]! Z  e3 O% o! i  question 57)' c0 e/ g( Z! t
  which of the following most closely describes a bitset collection?( y" q* k# o; e9 K# Q1 `2 }
  1) a class that contains groups of unique sequences of bits* W( L& Q5 H9 q, h
  2) a method for flipping individual bits in instance of a primitive type1 ^, d4 o8 G$ W6 e4 P/ p
  3) an array of boolean primitives that indicate zeros or ones5 a9 S# Y* l, p5 S
  4) a collection for storing bits as on-off information, like a vector of bits9 ~9 x: c2 A  T$ b6 x" u
  answer to question 574 G/ Y, v) z7 ]. [  D
  --------------------------------------------------------------------------------
2 J( E# w  ]0 N* h% ]5 c, J" F: p  question 58)7 E0 V% ~0 z* D/ M* \& k% E: T6 g
  you have these files in the same directory. what will happen when you attempt to compile and run class1.java if you have not already compiled base.java) m1 y. ?; T+ d1 n, I6 J5 _
  //base.java
: H. H- P" W6 \8 F8 v2 {8 ?/ N  x- {2 W  x# u
  package base;
回复

使用道具 举报

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

java认证试题:Java认证模拟题及分析(5)

</p>  class base{
: G) M! u8 P+ m* j  protected void amethod(){" _, c/ m3 H# N& X. u2 l$ I
  system.out.println('amethod');' o$ Y6 ]; K) F
  }//end of amethod2 V# e/ G( R! N
  }//end of class base: Z: q8 I% L) y+ d- U/ W, o1 i
  package class1;
3 x  s( S/ h. r  K1 K' a  `  //class1.java
/ w* N# D) o& b2 E# K  public class class1 extends base{
" O1 x  x' n( P+ D& p) W8 P  P8 ]  public static void main(string argv[]){
$ M% `: T1 C% H  base b = new base();7 F. D/ I% {1 X) @6 U" Z
  b.amethod();6 B& T8 O+ z3 W& {( D
  }//end of main, [+ t& z1 R' C) p* \, y, u
  }//end of class17 ^+ t5 Y! ?/ r9 r  l; _( F1 d; [
  1) compile error: methods in base not found
" h$ {% o' o3 Q: k  2) compile error: unable to access protected method in base class; Z& w: m, H6 a( g2 l: o
  3) compilation followed by the output 'amethod'
1 Y7 U4 k5 k/ N; _( W  4)compile error: superclass class1.base of class class1.class1 not found) y: A* a% ^# Z! I6 _# m: n
  answer to question 58. q( A& W* _! _# C8 Z  J) [3 P
  --------------------------------------------------------------------------------
8 e2 G, R' i" f) ^1 |# i  question 59)  W# [" P1 k1 V7 G$ G, B6 f5 h
  what will happen when you attempt to compile and run the following code0 |7 F. k/ b$ o* r5 {% Y8 O: B
  class base{, @  C. V+ m9 R0 g
  private void amethod(int ibase){; p. W% L; V* Q! N  q
  system.out.println('base.amethod');
回复 支持 反对

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-22 03:34 , Processed in 0.178551 second(s), 23 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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