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 3669

Given:
22.    StringBuilder sb1 = new StringBuilder("123");
23.    String s1 = "123";
24.    // insert code here
25. System.out.println(sb1 + " " + s1);
Which code fragment, inserted at line 24, outputs "123abc 123abc"?
 

Option A

A.    sb1.append("abc"); s1.append("abc");
 

Option B

B.    sb1.append("abc"); s1.concat("abc");
 

Option C

C.    sb1.concat("abc"); s1.append("abc");
 

Option D

D.    sb1.concat("abc"); s1.concat("abc");
 

Option E

E.    sb1.append("abc"); s1 = s1.concat("abc");
 

Option F

F.    sb1.concat("abc"); s1 = s1.concat("abc");
 

Correct Answer E
Explanation


Question ID 3670

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?

 

Option A

A.    Compilation fails.
 

Option B

B.    The file system has a new empty directory named dir.
 

Option C

C.    The file system has a new empty directory named newDir.
 

Option D

D.    The file system has a directory named dir, containing a file f1.txt.
 

Option E

E.    The file system has a directory named newDir, containing a file f1.txt.
 

Correct Answer E
Explanation

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