a我考网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 70|回复: 0

[考试试题] 2011年JAVA认证模拟题(41)

[复制链接]
发表于 2012-8-4 12:33:16 | 显示全部楼层 |阅读模式
  Q121 Which method sets the size and position of a component?" Y+ J6 n0 o' x) v8 S* s8 {0 o
  A setBounds();
2 m! n0 S! L: |; `* }5 w' A- c  B setSizeAndPosition()
* |- A1 S$ f( L8 Y: v: q  C setComponentSize()
; V- O# t: \. d' W/ `2 t5 d  D setComponent()
6 o& e# m* ~# J, v1 Y  Q122 Which of the following are true?
2 k7 w1 b: G& ]5 t9 n: ?  A The InputStream and outputStream classes are byte-oriented.
* o' A; J4 d3 t  B The ObjectInputStream and ObjectOutputStream classes do not support serialized object input and output.
; s# t) D9 M( _& \% w  i  C The Reader and Writer classes are character-oriented.: e9 q% {6 h' s8 f" j
  D The Reader and Writer classes are the preferred solution to serialized object output.
% |8 c- b& j8 l6 [; _6 _0 q2 x  Q123 What is the result of the following program?
! X' w4 x7 _( P  class Question {/ g, ^3 I( q4 t6 i
  public static void main (String[] args)
% d5 H; R8 {# a' @7 D: f% S9 m  {
4 l' E; W/ N5 x! B  int i =7;6 l) C: D$ L) h! n0 x
  int j =8;- }5 M( G% a9 ~) T* a+ a( x. V& W
  int n = (i | j) % (i & j);
5 D4 l; x7 Y' [3 N6 g( D! ?  System.out.print(n);( I4 |+ k8 Z1 k8 b% I; {2 s
  }
/ X- |; ~! o. c9 a! ^! y  }7 R- {+ @0 S$ Q" `& P0 Z  G! R
  A 0
# @( D7 K0 k  z( q  R  B 15
; G2 ~* p8 w+ u3 H) ]+ U  C An ArithmeticException is thrown.. _8 p% ~1 J. u; [. ~+ r, }2 i5 `
  D -15
$ w0 W8 \) z2 }  Q121 A' [. ]9 z" L) c0 k% o. [
  Q122 AC' x6 `6 Z5 ?4 y2 d% K" n
  Q123 C
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-18 01:11 , Processed in 0.219709 second(s), 21 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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