AllExam Dumps

DUMPS, FREE DUMPS, VCP5 DUMPS| VMWARE DUMPS, VCP DUMPS, VCP4 DUMPS, VCAP DUMPS, VCDX DUMPS, CISCO DUMPS, CCNA, CCNA DUMPS, CCNP DUMPS, CCIE DUMPS, ITIL, EXIN DUMPS,


READ Free Dumps For Oracle- 1z0-851





Question ID 3681

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?
 
 

Option A

A.    Line 5
 

Option B

B.    Line 6
 

Option C

C.    Line 7
 

Option D

D.    Line 8
 

Option E

E.    Line 9
 

Option F

F.    Line 10
 

Correct Answer D
Explanation


Question ID 3682

Given:
11.    public static void test(String str) {
12.    int check = 4;
13.    if (check = str.length()) {
14.    System.out.print(str.charAt(check -= 1) +", ");
15.    } else {
16.    System.out.print(str.charAt(0) + ", ");
17.    }
18.    } and the invocation:
21.    test("four");
22.    test("tee");
23.    test("to"); What is the result?
 

Option A

A.    r, t, t,
 

Option B

B.    r, e, o,
 

Option C

C.    Compilation fails.
 

Option D

D.    An exception is thrown at runtime.
 

Correct Answer C
Explanation

Send email to admin@getfreedumps for new dumps request!!!