It is more faster and easier to pass the Oracle 1Z0-851 exam by using Validated Oracle Java Standard Edition 6 Programmer Certified Professional Exam questuins and answers. Immediate access to the Leading 1Z0-851 Exam and find the same core area 1Z0-851 questions with professionally verified answers, then PASS your exam with a high score now.

2016 Sep 1z0-851 enu:

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


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


Q183. Given:

1. package test;

2.

3. class Target {

4. public String name = "hello";

5. }

What can directly access and change the value of the variable name?

A. any class

B. only the Target class

C. any class in the test package

D. any class that extends Target

Answer: C


Q184. Given:

1. public class TestString1 {

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

3. String str = "420";

4. str += 42;

5. System.out.print(str);

6. }

7. }

What is the output?

A. 42

B. 420

C. 462

D. 42042

E. Compilation fails.

F. An exception is thrown at runtime.

Answer: D


Q185. Given:

1. public class KungFu {

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

3. Integer x = 400;

4. Integer y = x;

5. x++;

6. StringBuilder sb1 = new StringBuilder("123");

7. StringBuilder sb2 = sb1;

8. sb1.append("5");

9. System.out.println((x==y) + " " + (sb1==sb2));

10. }

11. }

What is the result?

A. true true

B. false true

C. true false

D. false false

E. Compilation fails.

F. An exception is thrown at runtime.

Answer: B


certifyforall.com

Up to the immediate present ocjp 1z0-851 exam:

Q186. A company that makes Computer Assisted Design (CAD) software has, within its application, some utility classes that are used to perform 3D rendering tasks. The company's chief scientist has just improved the performance of one of the utility classes' key rendering algorithms, and has assigned a programmer to

replace the old algorithm with the new algorithm. When the programmer begins researching the utility

classes, she is happy to discover that the algorithm to be replaced exists in only one class. The

programmer reviews that class's API, and replaces the old algorithm with the new algorithm, being careful

that her changes adhere strictly to the class's API. Once testing has begun, the programmer discovers that

other classes that use the class she changed are no longer working properly. What design flaw is most

likely the cause of these new bugs?

A. Inheritance

B. Tight coupling

C. Low cohesion

D. High cohesion

E. Loose coupling

F. Object immutability

Answer: B


Q187. Which two code fragments will execute the method doStuff() in a separate thread? (Choose two.)

A. new Thread() {

public void run() { doStuff(); }

};

B. new Thread() {

public void start() { doStuff(); }

};

C. new Thread() {

public void start() { doStuff(); }

}.run();

D. new Thread() {

public void run() { doStuff(); }

}.start();

E. new Thread(new Runnable() {

public void run() { doStuff(); }

}).run();

F. new Thread(new Runnable() {

public void run() { doStuff(); }

}).start();

Answer: DF


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


Q189. Click the Exhibit button. Which three code fragments, added individually at line 29, produce the output 100? (Choose three.)


A. n = 100;

B. i.setX( 100 );

C. o.getY().setX( 100 );

D. i = new Inner(); i.setX( 100 );

E. o.setY( i ); i = new Inner(); i.setX( 100 );

F. i = new Inner(); i.setX( 100 ); o.setY( i );

Answer: BCF


Q190. Which three statements are true? (Choose three.)

A. A final method in class X can be abstract if and only if X is abstract.

B. A protected method in class X can be overridden by any subclass of X.

C. A private static method can be called only within other static methods in class X.

D. A non-static public final method in class X can be overridden in any subclass of X.

E. A public static method in class X can be called by a subclass of X without explicitly referencing the class

X.

F. A method with the same signature as a private final method in class X can be implemented in a

subclass of X.

G. A protected method in class X can be overridden by a subclass of X only if the subclass is in the same

package as X.

Answer: BEF