[Aug 2016] scjp 1z0-851 syllabus

Want to know {brand} 1Z0-851 Exam practice test features? Want to lear more about Oracle Java Standard Edition 6 Programmer Certified Professional Exam certification experience? Study Real Oracle 1Z0-851 answers to Most up-to-date 1Z0-851 questions at {brand}. Gat a success with an absolute guarantee to pass Oracle 1Z0-851 (Java Standard Edition 6 Programmer Certified Professional Exam) test on your first attempt.

2016 Aug 1Z0-851 Study Guide Questions:

Q81. Given:

11. class X { public void foo() { System.out.print("X "); } }

12.

13. public class SubB extends X {

14. public void foo() throws RuntimeException {

15. super.foo();

16. if (true) throw new RuntimeException();

17. System.out.print("B ");

18. }

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

20. new SubB().foo();

21. }

22. }

What is the result?

A. X, followed by an Exception.

B. No output, and an Exception is thrown.

C. Compilation fails due to an error on line 14.

D. Compilation fails due to an error on line 16.

E. Compilation fails due to an error on line 17.

F. X, followed by an Exception, followed by B.

Answer: A

Q82. Given:

1. package com.company.application;

2.

3. public class MainClass {

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

5. }

And MainClass exists in the /apps/com/company/application directory. Assume the CLASSPATH environment variable is set to "." (current directory). Which two java commands entered at the command line will run MainClass? (Choose two.)

A. java MainClass if run from the /apps directory

B. java com.company.application.MainClass if run from the /apps directory

C. java -classpath /apps com.company.application.MainClass if run from any directory

D. java -classpath . MainClass if run from the /apps/com/company/application directory

E. java -classpath /apps/com/company/application:. MainClass if run from the /apps directory

F. java com.company.application.MainClass if run from the /apps/com/company/application directory

Answer: BC

Q83. Given:

11. public class Test {

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

13. int x = 5;

14. boolean b1 = true;

15. boolean b2 = false;

16.

17. if ((x == 4) && !b2 )

18. System.out.print("1 ");

19. System.out.print("2 ");

20. if ((b2 = true) && b1 )

21. System.out.print("3 ");

22. }

23. }

What is the result?

A. 2

B. 3

C. 1 2

D. 2 3

E. 1 2 3

F. Compilation fails.

G. An exception is thrown at runtime.

Answer: D

1Z0-851  braindumps

Regenerate exam 1z0-851:

Q84. Given:

11. public class Commander {

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

13. String myProp = /* insert code here */

14. System.out.println(myProp);

15. }

16. }

and the command line: java -Dprop.custom=gobstopper Commander Which two, placed on line 13, will

produce the output gobstopper? (Choose two.)

A. System.load("prop.custom");

B. System.getenv("prop.custom");

C. System.property("prop.custom");

D. System.getProperty("prop.custom");

E. System.getProperties().getProperty("prop.custom");

Answer: DE

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

Q86. DRAG DROP

Click the Task button.

Answer:

1Z0-851  braindumps

Verified 1z0-851 practice test pdf:

Q87. Given:

11. public class Person {

12. private name;

13. public Person(String name) {

14. this.name = name;

15. }

16. public int hashCode() {

17. return 420;

18. }

19. }

Which statement is true?

A. The time to find the value from HashMap with a Person key depends on the size of the map.

B. Deleting a Person key from a HashMap will delete all map entries for all keys of type Person.

C. Inserting a second Person object into a HashSet will cause the first Person object to be removed as a duplicate.

D. The time to determine whether a Person object is contained in a HashSet is constant and does NOT depend on the size of the map.

Answer: A

Q88. Given:

10. class Nav{

11. public enum Direction { NORTH, SOUTH, EAST, WEST }

12. }

13. public class Sprite{

14. // insert code here

15. }

Which code, inserted at line 14, allows the Sprite class to compile?

A. Direction d = NORTH;

B. Nav.Direction d = NORTH;

C. Direction d = Direction.NORTH;

D. Nav.Direction d = Nav.Direction.NORTH;

Answer: D

Q89. Given:

1. public class Blip {

2. protected int blipvert(int x) { return 0; }

3. }

4. class Vert extends Blip {

5. // insert code here

6. }

Which five methods, inserted independently at line 5, will compile? (Choose five.)

A. public int blipvert(int x) { return 0; }

B. private int blipvert(int x) { return 0; }

C. private int blipvert(long x) { return 0; }

D. protected long blipvert(int x) { return 0; }

E. protected int blipvert(long x) { return 0; }

F. protected long blipvert(long x) { return 0; }

G. protected long blipvert(int x, int y) { return 0; }

Answer: ACEFG

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

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.