It is impossible to pass Oracle 1Z0-851 exam without any help in the short term. Come to Examcollection soon and find the most advanced, correct and guaranteed Oracle 1Z0-851 practice questions. You will get a surprising result by our Leading Java Standard Edition 6 Programmer Certified Professional Exam practice guides.

2016 Oct 1z0-851 pdf free download:

Q171. DRAG DROP

Click the Task button.

Answer:


Q172. DRAG DROP

Click the Task button.

Answer:


Q173. Given:

10. public class SuperCalc {

11. protected static int multiply(int a, int b) { return a * b;}

12. }

and:

20. public class SubCalc extends SuperCalc{

21. public static int multiply(int a, int b) {

22. int c = super.multiply(a, b);

23. return c;

24. }

25. }

and:

30. SubCalc sc = new SubCalc ();

31. System.out.println(sc.multiply(3,4));

32. System.out.println(SubCalc.multiply(2,2));

What is the result?

A. 12

B. The code runs with no output.

C. An exception is thrown at runtime.

D. Compilation fails because of an error in line 21.

E. Compilation fails because of an error in line 22.

F. Compilation fails because of an error in line 31.

Answer: E


Q174. Given:

10. public class Foo {

11. static int[] a;

12. static { a[0]=2; }

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

14. }

Which exception or error will be thrown when a programmer attempts to run this code?

A. java.lang.StackOverflowError

B. java.lang.IllegalStateException

C. java.lang.ExceptionInInitializerError

D. java.lang.ArrayIndexOutOfBoundsException

Answer: C


Q175. Given:

11. class Mammal { }

12.

13. class Raccoon extends Mammal {

14. Mammal m = new Mammal();

15. }

16.

17. class BabyRaccoon extends Mammal { }

Which four statements are true? (Choose four.)

A. Raccoon is-a Mammal.

B. Raccoon has-a Mammal.

C. BabyRaccoon is-a Mammal.

D. BabyRaccoon is-a Raccoon.

E. BabyRaccoon has-a Mammal.

F. BabyRaccoon is-a BabyRaccoon.

Answer: ABCF


Regenerate 1z0-851 dumps latest:

Q176. Given:

11. String test = "a1b2c3";

12. String[] tokens = test.split("\\d");

13. for(String s: tokens) System.out.print(s + " ");

What is the result?

A. a b c

B. 1 2 3

C. a1b2c3

D. a1 b2 c3

E. Compilation fails.

F. The code runs with no output.

G. An exception is thrown at runtime.

Answer: A


Q177. Given:

11. // insert code here

12. private N min, max;

13. public N getMin() { return min; }

14. public N getMax() { return max; }

15. public void add(N added) {

16. if (min == null || added.doubleValue() < min.doubleValue())

17. min = added;

18. if (max == null || added.doubleValue() > max.doubleValue())

19. max = added;

20. }

21. }

Which two, inserted at line 11, will allow the code to compile? (Choose two.)

A. public class MinMax<?> {

B. public class MinMax<? extends Number> {

C. public class MinMax<N extends Object> {

D. public class MinMax<N extends Number> {

E. public class MinMax<? extends Object> {

F. public class MinMax<N extends Integer> {

Answer: DF


Q178. Given:

3. import java.util.*;

4. public class Mapit {

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

6. Set<Integer> set = new HashSet<Integer>();

7. Integer i1 = 45;

8. Integer i2 = 46;

9. set.add(i1);

10. set.add(i1);

11. set.add(i2); System.out.print(set.size() + " ");

12. set.remove(i1); System.out.print(set.size() + " ");

13. i2 = 47;

14. set.remove(i2); System.out.print(set.size() + " ");

15. }

16. }

What is the result?

A. 2 1 0

B. 2 1 1

C. 3 2 1

D. 3 2 2

E. Compilation fails.

F. An exception is thrown at runtime.

Answer: B


Q179. A programmer has an algorithm that requires a java.util.List that provides an efficient implementation of add (0, object), but does NOT need to support quick random access. What supports these requirements?

A. java.util.Queue

B. java.util.ArrayList

C. java.util.LinearList

D. java.util.LinkedList

Answer: D


Q180. Given:

11. abstract class Vehicle { public int speed() { return 0; }

12. class Car extends Vehicle { public int speed() { return 60; }

13. class RaceCar extends Car { public int speed() { return 150; } ...

21. RaceCar racer = new RaceCar();

22. Car car = new RaceCar();

23. Vehicle vehicle = new RaceCar();

24. System.out.println(racer.speed() + ", " + car.speed()

25. + ", " + vehicle.speed());

What is the result?

A. 0, 0, 0

B. 150, 60, 0

C. Compilation fails.

D. 150, 150, 150

E. An exception is thrown at runtime.

Answer: D