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 3922

Given:
11.    public static Collection get() {
12.    Collection sorted = new LinkedList();
13.    sorted.add("B"); sorted.add("C"); sorted.add("A");
14.    return sorted;
15.    }
16.    public static void main(String[] args) {
17.    for (Object obj: get()) {
18.    System.out.print(obj + ", ");
19.    }
20. }
What is the result?
 

Option A

A.    A, B, C,
 

Option B

B.    B, C, A,
 

Option C

C.    Compilation fails.
 

Option D

D.    The code runs with no output.
 

Correct Answer B
Explanation


Question ID 3923

Given:
11.    public void testIfA() {
12.    if (testIfB("True")) {
13.    System.out.println("True");
14.    } else {
15.    System.out.println("Not true");
16.    }
17.    }
18.    public Boolean testIfB(String str) {
19.    return Boolean.valueOf(str);
20.    }
What is the result when method testIfA is invoked?
 

Option A

A.    True
 

Option B

B.    Not true
 

Option C

C.    An exception is thrown at runtime.
 

Option D

D.    Compilation fails because of an error at line 12.
 

Option E

E.    Compilation fails because of an error at line 19.
 

Correct Answer A
Explanation

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