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 |