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 3930

Given:
1.    public class Drink implements Comparable {
2.    public String name;
3.    public int compareTo(Object o) {
4.    return 0;
5.    }
6.    } and:
20.    Drink one = new Drink();
21.    Drink two = new Drink();
22.    one.name= "Coffee";
23.    two.name= "Tea";
24.    TreeSet set = new TreeSet();
25.    set.add(one);
26.    set.add(two);
A programmer iterates over the TreeSet and prints the name of each Drink object. What is the result?
 

Option A

A.    Tea
 

Option B

B.    Coffee
 

Option C

C.    Coffee Tea
 

Option D

D.    Compilation fails.

 

Option E

E.    The code runs with no output.
 

Option F

F.    An exception is thrown at runtime.

Correct Answer B
Explanation


Question ID 3931

Which two scenarios are NOT safe to replace a StringBuffer object with a StringBuilder object? (Choose two.)
 

Option A

A.    When using versions of Java technology earlier than 5.0.
 

Option B

B.    When sharing a StringBuffer among multiple threads.
 

Option C

C.    When using the java.io class StringBufferInputStream.
 

Option D

D.    When you plan to reuse the StringBuffer to build more than one string.
 

Correct Answer A,B
Explanation

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