a我考网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 93|回复: 0

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

[复制链接]
发表于 2012-8-4 12:33:16 | 显示全部楼层 |阅读模式
  Q79 What output is displayed by the following program?" ?: ~" ^' k( I( I- G' Q
  import java.io.*;
+ ?! m- e. [& u6 ]5 T2 [  public class TestIOApp {
# N, [* V$ y3 ~: J  ~/ C# d  public static void main(String args[])0 k( U/ O  }! ~- D3 {
  throws IOException {
" Y8 V3 `* y: u0 T  StringReader strinin = new# B( T- o9 R% l4 z1 z
  StringReader(“test”);: S$ X5 ]1 K" s
  LineNumberReader in = new& K8 Q2 D. G% o8 W# O
  LineNumberReader(strinin);# F% `: k& D7 Y3 [2 [
  PrintWriter out = new
/ ~5 S) |4 l9 ^5 Z/ x1 F3 b- U  PrintWriter(System.out);) C$ `: N/ ~7 v; q
  out.println(in.readLine());+ ?% Y8 W' }. u# q  C  Y* [) Y
  out.flush();: H( ?- S9 A  y, b4 D( I
  }
4 h1 W% t# P' k% M8 ?) p  }+ h* e  E6 N5 Q' k. V
  A test
  T' x4 o' n* i% S( {! D7 p+ h  B 1. test
# l9 x$ g, Y* ~' N  C 1: test9 J5 c+ Q7 E' s* \0 v. Z
  D 1 test
6 W( J  O( s6 ]/ H5 K/ _  Q80 Which of the following methods cause the String object referenced by s to be changed?
- n% j# j# n8 p  A s.concat()( Y; C" h% u$ s* b% j) C
  B s.toUpperCase()6 H' A; ]+ j- u) M
  C s.replace()
/ _* C( c; Q6 `6 S  D None of the above.; t/ M* @' s: w/ c+ h
  Q81 Given non-static classes Outer and Inner where Inner is declared as an inner class of Outer, how is an instance of outer accessed from within the scope of Inner?% \/ z& G6 C2 c9 W- ~- ?
  A this
4 r$ N) Z. B+ g6 B7 e  B this.Outer& t/ O5 m/ r' k
  C Outer.this# j9 w# {: d+ \  ?4 l" L# }
  D this.this
+ S& m6 d: n. F4 I; m/ X  Q079 A
0 K+ z& F/ R% U7 ~; W6 \  [  Q080 D
' @, R" s. H/ l, S/ X* p  Q081 C
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-21 15:56 , Processed in 0.215815 second(s), 21 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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