单项选择题X 纠错
A. Foo has the value of “”
B. Foo has the value of null.
C. Foo has the value of “blue”
D. Foo has the value of “green”
E. An exception is thrown.
F. The code will not compile.
你可能喜欢
多项选择题
A. Char ch = “a”;
B. Char ch = ‘“‘ ‘;
C. Char ch = ‘cafe‘;
D. Char ch = “cafe”;
E. Char ch = ‘“ucafe‘;
F. Char ch = ‘“u10100‘;
G. Char ch = (char) true;
单项选择题
A. The code compiles and “s=” is printed.
B. The code compiles and “s=null” is printed.
C. The code does not compile because string s is not initialized.
D. The code does not compile because string s cannot be referenced.
E. The code compiles, but a NullPointerException is thrown when toString is called.
多项选择题
A. Final int k = 4;
B. Public int k = 4;
C. Static int k = 4;
D. Private int k = 4;
E. Abstract int k = 4;
F. Volatile int k = 4;
G. Transient int k = 4;
H. Protected int k = 4;
单项选择题
A. Foo has the value “”
B. Foo has the value null
C. An exception is thrown
D. The code will not compile
单项选择题
A. Java Test 2222
B. Java Test 1 2 3 4
C. Java Test 4 2 4 2
D. Java Test 4 3 2 1
单项选择题
A. Compilation will succeed.
B. Compilation will fail at line 5.
C. Compilation will fail at line 6.
D. Compilation will fail at line 14.
E. Compilation will fail at line 17.
单项选择题
A. New BufferedInputStream(“in.txt”);
B. New BufferedInputStream(new File(“in.txt”));
C. New BufferedInputStream(Writer(“in.txt”));
D. New BufferedInputStream(new Writer(“in.txt”));
E. New BufferedInputStream(new InputStream(“in.txt”));
F. New BufferedInputStream(new FileInputStream(“in.txt”));
多项选择题
A. OutputStream out=new FileOutputStream(“file.txt”);
B. OutputStream out=new FileOutputStream(“file.txt”, “append”);
C. FileOutputStream out=new FileOutputStream(“file.txt”, true);
D. FileOutputStream out=new FileOutputStream(new file(“file.txt”));
E. OutputStream out=new FileOutputStream(new File(“file.txt”)true);
多项选择题
A. InputStream in=new FileReader(“file.txt”);
B. InputStream in=new FileInputStream(“file.txt”);
C. InputStream in=new InputStreamFileReader (“file.txt”, “read”);
D. FileInputStream in=new FileReader(new File(“file.txt”));
E. FileInputStream in=new FileInputStream(new File(“file.txt”));