This so-called It all recognition was the key brands with regards to advertising and marketing their unique items, developing a lot of specialized employees that can deliver their items having skilled specialized aid. These types of 1Z0-851 document might possibly be attained by means of evaluation. Usually, it can be through the common 1Z0-851 evaluation. Equivalent technology 1Z0-851 recognition consists involving job areas inside business. Not surprisingly, if anyone who own become the relevant vouchers, theyll obtain pay keeping that in mind.

2016 Dec ocjp 1z0-851 syllabus:

Q1. Click the Exhibit button. Which statement is true about the classes and interfaces in the exhibit?

A. Compilation will succeed for all classes and interfaces.

B. Compilation of class C will fail because of an error in line 2.

C. Compilation of class C will fail because of an error in line 6.

D. Compilation of class AImpl will fail because of an error in line 2.

Answer: C


Q2. DRAG DROP

Click the Task button.

Answer:


Q3. Given:

1. interface A { public void aMethod(); }

2. interface B { public void bMethod(); }

3. interface C extends A,B { public void cMethod(); }

4. class D implements B {

5. public void bMethod(){}

6. }

7. class E extends D implements C {

8. public void aMethod(){}

9. public void bMethod(){}

10. public void cMethod(){}

11. }

What is the result?

A. Compilation fails because of an error in line 3.

B. Compilation fails because of an error in line 7.

C. Compilation fails because of an error in line 9.

D. If you define D e = new E(), then e.bMethod() invokes the version of bMethod() defined in Line 5.

E. If you define D e = (D)(new E()), then e.bMethod() invokes the version of bMethod() defined in Line 5.

F. If you define D e = (D)(new E()), then e.bMethod() invokes the version of bMethod() defined in Line 9.

Answer: F


Q4. Given:

2. public class Hi {

3. void m1() { }

4. protected void() m2 { }

5. }

6. class Lois extends Hi {

7. // insert code here

8. }

Which four code fragments, inserted independently at line 7, will compile? (Choose four.)

A. public void m1() { }

B. protected void m1() { }

C. private void m1() { }

D. void m2() { }

E. public void m2() { }

F. protected void m2() { }

G. private void m2() { }

Answer: ABEF


Q5. Given:

1. interface DoStuff2 {

2. float getRange(int low, int high); }

3.

4. interface DoMore {

5. float getAvg(int a, int b, int c); }

6.

7. abstract class DoAbstract implements DoStuff2, DoMore { }

8.

9. class DoStuff implements DoStuff2 {

10. public float getRange(int x, int y) { return 3.14f; } }

11.

12. interface DoAll extends DoMore {

13. float getAvg(int a, int b, int c, int d); }

What is the result?

A. The file will compile without error.

B. Compilation fails. Only line 7 contains an error.

C. Compilation fails. Only line 12 contains an error.

D. Compilation fails. Only line 13 contains an error.

E. Compilation fails. Only lines 7 and 12 contain errors.

F. Compilation fails. Only lines 7 and 13 contain errors.

G. Compilation fails. Lines 7, 12, and 13 contain errors.

Answer: A


Abreast of the times java se 6 programmer certified professional exam 1z0-851 dumps:

Q6. 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?

A. Tea

B. Coffee

C. Coffee Tea

D. Compilation fails.

E. The code runs with no output.

F. An exception is thrown at runtime.

Answer: B


Q7. Given:

1. class TestException extends Exception { }

2. class A {

3. public String sayHello(String name) throws TestException {

4. if(name == null) throw new TestException();

5. return "Hello " + name;

6. }

7. }

8. public class TestA {

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

10. new A().sayHello("Aiko");

11. }

12. }

Which statement is true?

A. Compilation succeeds.

B. Class A does not compile.

C. The method declared on line 9 cannot be modified to throw TestException.

D. TestA compiles if line 10 is enclosed in a try/catch block that catches TestException.

Answer: D


Q8. Given:

11. public interface A { public void m1(); }

12.

13. class B implements A { }

14. class C implements A { public void m1() { } }

15. class D implements A { public void m1(int x) { } }

16. abstract class E implements A { }

17. abstract class F implements A { public void m1() { } }

18. abstract class G implements A { public void m1(int x) { } }

What is the result?

A. Compilation succeeds.

B. Exactly one class does NOT compile.

C. Exactly two classes do NOT compile.

D. Exactly four classes do NOT compile.

E. Exactly three classes do NOT compile.

Answer: C


Q9. Given:

11. class Converter {

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

13. Integer i = args[0];

14. int j = 12;

15. System.out.println("It is " + (j==i) + " that j==i.");

16. }

17. }

What is the result when the programmer attempts to compile the code and run it with the command java Converter 12?

A. It is true that j==i.

B. It is false that j==i.

C. An exception is thrown at runtime.

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

Answer: D


Q10. Given:

11. class A {

12. public void process() { System.out.print("A,"); }

13. class B extends A {

14. public void process() throws IOException {

15. super.process();

16. System.out.print("B,");

17. throw new IOException();

18. }

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

20. try { new B().process(); }

21. catch (IOException e) { System.out.println("Exception"); }

22. }

What is the result?

A. Exception

B. A,B,Exception

C. Compilation fails because of an error in line 20.

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

E. A NullPointerException is thrown at runtime.

Answer: D