We provide real 1Z0-851 exam questions and answers braindumps in two formats. Download PDF & Practice Tests. Pass Oracle 1Z0-851 Exam quickly & easily. The 1Z0-851 PDF type is available for reading and printing. You can print more and practice many times. With the help of our Oracle 1Z0-851 dumps pdf and vce product and material, you can easily pass the 1Z0-851 exam.


♥♥ 2021 NEW RECOMMEND ♥♥

Free VCE & PDF File for Oracle 1Z0-851 Real Exam (Full Version!)

★ Pass on Your First TRY ★ 100% Money Back Guarantee ★ Realistic Practice Exam Questions

Free Instant Download NEW 1Z0-851 Exam Dumps (PDF & VCE):
Available on: http://www.surepassexam.com/1Z0-851-exam-dumps.html

Q121. Click the Exhibit button. What is the output of the program shown in the exhibit?

A. 300-100-100-100-100

B. 300-300-100-100-100

C. 300-300-300-100-100

D. 300-300-300-300-100

Answer: B


Q122. DRAG DROP

Click the Task button.

Answer:


Q123. Given:

31. // some code here

32. try {

33. // some code here

34. } catch (SomeException se) {

35. // some code here

36. } finally {

37. // some code here

38. }

Under which three circumstances will the code on line 37 be executed? (Choose three.)

A. The instance gets garbage collected.

B. The code on line 33 throws an exception.

C. The code on line 35 throws an exception.

D. The code on line 31 throws an exception.

E. The code on line 33 executes successfully.

Answer: BCE


Q124. Given:

5. import java.util.Date;

6. import java.text.DateFormat;

21. DateFormat df;

22. Date date = new Date();

23. // insert code here

24. String s = df.format(date);

Which code fragment, inserted at line 23, allows the code to compile?

A. df = new DateFormat();

B. df = Date.getFormat();

C. df = date.getFormat();

D. df = DateFormat.getFormat();

E. df = DateFormat.getInstance();

Answer: E


Q125. Given:

21. abstract class C1 {

22. public C1() { System.out.print(1); }

23. }

24. class C2 extends C1 {

25. public C2() { System.out.print(2); }

26. }

27. class C3 extends C2 {

28. public C3() { System.out.println(3); }

29. }

30. public class Ctest {

31. public static void main(String[] a) { new C3(); }

32. }

What is the result?

A. 3

B. 23

C. 32

D. 123

E. 321

F. Compilation fails.

G. An exception is thrown at runtime.

Answer: D


Q126. DRAG DROP

Click the Task button.

Answer:


Q127. Given:

11. public static void main(String[] args) {

12. for (int i = 0; i <= 10; i++) {

13. if (i > 6) break;

14. }

15. System.out.println(i);

16. }

What is the result?

A. 6

B. 7

C. 10

D. 11

E. Compilation fails.

F. An exception is thrown at runtime.

Answer: E


Q128. Given:

1. public class TestFive {

2. private int x;

3. public void foo() {

4. int current = x;

5. x = current + 1;

6. }

7. public void go() {

8. for(int i = 0; i < 5; i++) {

9. new Thread() {

10. public void run() {

11. foo();

12. System.out.print(x + ", ");

13. } }.start();

14. } }

Which two changes, taken together, would guarantee the output: 1, 2, 3, 4, 5, ? (Choose two.)

A. move the line 12 print statement into the foo() method

B. change line 7 to public synchronized void go() {

C. change the variable declaration on line 2 to private volatile int x; D. wrap the code inside the foo() method with a synchronized( this ) block

D. wrap the for loop code inside the go() method with a synchronized block synchronized(this) { // for loop code here }

Answer: AD


Q129. Given that: Gadget has-a Sprocket and Gadget has-a Spring and Gadget is-a Widget and Widget has-a

Sprocket Which two code fragments represent these relationships? (Choose two.)

A. class Widget { Sprocket s; }

class Gadget extends Widget { Spring s; }

B. class Widget { }

class Gadget extends Widget { Spring s1; Sprocket s2; }

C. class Widget { Sprocket s1; Spring s2; }

class Gadget extends Widget { }

D. class Gadget { Spring s; }

class Widget extends Gadget{ Sprocket s; }

E. class Gadget { }

class Widget extends Gadget{ Sprocket s1; Spring s2; }

F. class Gadget { Spring s1; Sprocket s2; }

class Widget extends Gadget{ }

Answer: AC


Q130. Given:

12. NumberFormat nf = NumberFormat.getInstance();

13. nf.setMaximumFractionDigits(4);

14. nf.setMinimumFractionDigits(2);

15. String a = nf.format(3.1415926);

16. String b = nf.format(2);

Which two statements are true about the result if the default locale is Locale.US? (Choose two.)

A. The value of b is 2.

B. The value of a is 3.14.

C. The value of b is 2.00.

D. The value of a is 3.141.

E. The value of a is 3.1415.

F. The value of a is 3.1416.

G. The value of b is 2.0000.

Answer: CF