2011年JAVA认证模拟题(27)
Q79 What output is displayed by the following program?import java.io.*;
public class TestIOApp {
public static void main(String args[])
throws IOException {
StringReader strinin = new
StringReader(“test”);
LineNumberReader in = new
LineNumberReader(strinin);
PrintWriter out = new
PrintWriter(System.out);
out.println(in.readLine());
out.flush();
}
}
A test
B 1. test
C 1: test
D 1 test
Q80 Which of the following methods cause the String object referenced by s to be changed?
A s.concat()
B s.toUpperCase()
C s.replace()
D None of the above.
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?
A this
B this.Outer
C Outer.this
D this.this
Q079 A
Q080 D
Q081 C
页:
[1]