1Z0-851 무료 덤프문제 온라인 액세스
| 시험코드: | 1Z0-851 |
| 시험이름: | Java Standard Edition 6 Programmer Certified Professional Exam |
| 인증사: | Oracle |
| 무료 덤프 문항수: | 290 |
| 업로드 날짜: | 2026-11-19 |
Given that the current directory is empty, and that the user has read and write permissions, and the following:
11.import java.io.*;
12.public class DOS {
13.public static void main(String[] args) {
14.File dir = new File("dir");
15.dir.mkdir();
16.File f1 = new File(dir, "f1.txt");
17.try {
18.f1.createNewFile();
19.} catch (IOException e) { ; }
20.File newDir = new File("newDir");
21.dir.renameTo(newDir);
22.}
23.}
Which statement is true?
Given:
1.public class GC {
2.private Object o;
3.private void doSomethingElse(Object obj) { o = obj; }
4.public void doSomething() {
5.Object o = new Object();
6.doSomethingElse(o);
7.o = new Object();
8.doSomethingElse(null);
9.o = null;
10.}
11.}
When the doSomething method is called, after which line does the Object created in line 5 become available for garbage collection?
Which two code fragments correctly create and initialize a static array of int elements? (Choose two.)

