Ultimate Guide: java se 6 programmer certified professional exam 1z0-851 dumps

Exam Code: 1Z0-851 (Practice Exam Latest Test Questions VCE PDF)
Exam Name: Java Standard Edition 6 Programmer Certified Professional Exam
Certification Provider: Oracle
Free Today! Guaranteed Training- Pass 1Z0-851 Exam.

2016 Nov 1Z0-851 Study Guide Questions:

Q141. A UNIX user named Bob wants to replace his chess program with a new one, but he is not sure where the old one is installed. Bob is currently able to run a Java chess program starting from his home directory / home/bob using the command: java -classpath /test:/home/bob/downloads/*.jar games.Chess Bob's CLASSPATH is set (at login time) to:

/usr/lib:/home/bob/classes:/opt/java/lib:/opt/java/lib/*.jar What is a possible location for the Chess.class file?

A. /test/Chess.class

B. /home/bob/Chess.class

C. /test/games/Chess.class

D. /usr/lib/games/Chess.class

E. /home/bob/games/Chess.class

F. inside jarfile /opt/java/lib/Games.jar (with a correct manifest)

G. inside jarfile /home/bob/downloads/Games.jar (with a correct manifest)

Answer: C

Q142. Given that t1 is a reference to a live thread, which is true?

A. The Thread.sleep() method can take t1 as an argument.

B. The Object.notify() method can take t1 as an argument.

C. The Thread.yield() method can take t1 as an argument.

D. The Thread.setPriority() method can take t1 as an argument.

E. The Object.notify() method arbitrarily chooses which thread to notify.

Answer: E

Q143. Given:

1. public class GC {

2. private Object o;

3. private void doSomethingElse(Object obj) { o = obj; }

4. public void doSomething() {

5. Object o = new Object();

6. doSomethingElse(o);

7. o = new Object();

8. doSomethingElse(null);

9. o = null;

10. }

11. }

When the doSomething method is called, after which line does the Object created in line 5 become available for garbage collection?

A. Line 5

B. Line 6

C. Line 7

D. Line 8

E. Line 9

F. Line 10

Answer: D

1Z0-851  exam answers

Replace oracle 1z0-851 practice exam:

Q144. Given:

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

12. String str = "null";

13. if (str == null) {

14. System.out.println("null");

15. } else (str.length() == 0) {

16. System.out.println("zero");

17. } else {

18. System.out.println("some");

19. }

20. }

What is the result?

A. null

B. zero

C. some

D. Compilation fails.

E. An exception is thrown at runtime.

Answer: D

Q145. Given:

11. class ClassA {}

12. class ClassB extends ClassA {}

13. class ClassC extends ClassA {} and:

21. ClassA p0 = new ClassA();

22. ClassB p1 = new ClassB();

23. ClassC p2 = new ClassC();

24. ClassA p3 = new ClassB();

25. ClassA p4 = new ClassC();

Which three are valid? (Choose three.)

A. p0 = p1;

B. p1 = p2;

C. p2 = p4;

D. p2 = (ClassC)p1;

E. p1 = (ClassB)p3;

F. p2 = (ClassC)p4;

Answer: AEF

Q146. Given:

10: public class Hello {

11: String title;

12: int value;

13: public Hello() {

14: title += " World";

15: }

16: public Hello(int value) {

17: this.value = value;

18: title = "Hello";

19: Hello();

20: }

21: } and:

30: Hello c = new Hello(5);

31: System.out.println(c.title);

What is the result?

A. Hello

B. Hello World

C. Compilation fails.

D. Hello World 5

E. The code runs with no output.

F. An exception is thrown at runtime.

Answer: C

1Z0-851  exam answers

Precise ocjp 1z0-851 dumps pdf:

Q147. 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

Q148. 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

Q149. Given:

10. interface Data { public void load(); }

11. abstract class Info { public abstract void load(); }

Which class correctly uses the Data interface and Info class?

A. public class Employee extends Info implements Data { public void load() { /*do something*/ }

}

B. public class Employee implements Info extends Data { public void load() { /*do something*/ }

}

C. public class Employee extends Info implements Data { public void load(){ /*do something*/ }

public void Info.load(){ /*do something*/ }

}

D. public class Employee implements Info extends Data { public void Data.load(){ /*do something*/ }

public void load(){ /*do something*/ }

}

E. public class Employee implements Info extends Data { public void load(){ /*do something*/ }

public void Info.load(){ /*do something*/ }

}

F. public class Employee extends Info implements Data{

public void Data.load() { /*do something*/ }

public void Info.load() { /*do something*/ }

}

Answer: A

Q150. Given:

1. class Alligator {

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

3. int []x[] = {{1,2}, {3,4,5}, {6,7,8,9}};

4. int [][]y = x;

5. System.out.println(y[2][1]);

6. }

7. }

What is the result?

A. 2

B. 3

C. 4

D. 6

E. 7

F. Compilation fails.

Answer: E

About 1Z0-851 Information: 1Z0-851 Dumps

Certleader Dumps
Certleader is a company specialized on providing high quality IT exam materials and fully committed to assist our respected clients crack any IT certification tests on their 1st efforts.