[Free] 2017(Jan) EnsurePass Braindumps Oracle 1z0-850 Dumps with VCE and PDF 131-140

Ensurepass.com : Ensure you pass the IT Exams
2017 Jan Oracle Official New Released 1z0-850
100% Free Download! 100% Pass Guaranteed!
http://www.EnsurePass.com/1z0-850.html

Java Standard Edition 5 and 6, Certified Associate Exam

Question No: 131 – (Topic 2)

Given:

  1. class Variables {

  2. int i;

  3. String s;

  4. Object o;

  5. String g = null;

  6. Integer y;

  7. char c; 8. }

    Which four are object references? (Choose four.)

    1. c

    2. i

    3. s

    4. g

    5. y

    6. o

Answer: C,D,E,F

Question No: 132 – (Topic 2)

Which two are true? (Choose two.)

  1. Multiplicity indicators are optional, but if they are included they must be shown at both ends of an association.

  2. Multiplicity indicators must always be shown at both ends of an association.

  3. An optional association is shown using the multiplicity indicator 0..1.

  4. The multiplicity indicators and 1..* are equivalent.

  5. The multiplicity indicators * and 1..* are equivalent.

  6. 2..4 is a valid multiplicity indicator.

Answer: C,F

Question No: 133 – (Topic 2)

Given:

11. class Cat {

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

  2. Cat c1 = new Cat();

  3. Cat c3 = new Cat();

  4. Cat c2 = c1;

  5. Cat c4 = c3; 19. c1 = c4;

20. c4 = c2;

  1. if (c1 == c2) System.out.print(quot;c1 == c2 quot;);

  2. if (c1 == c3) System.out.print(quot;c1 == c3 quot;);

23. }

24. }

What is the result?

A. The output is unpredictable.

B. c1 == c2 c1 == c3

  1. No output is produced.

  2. c1 == c3

  3. c1 == c2

Answer: D

Question No: 134 – (Topic 2)

Given:

  1. // insert code here

  2. public void eat(); 7. }

8.

  1. // insert code here

  2. public void eat() {

  3. System.out.println(quot;eating dinnerquot;);

12. }

13. }

Which, inserted at lines 5 and 9, allows the file to compile?

  1. 5. class Animal {

    9. public class Tiger implements Animal {

  2. 5. interface Animal {

    9. public class Tiger implements Animal {

  3. 5. class Animal {

    9. public class Tiger subclasses Animal {

  4. 5. interface Animal {

    9. public class Tiger extends Animal {

  5. 5. class Animal {

    9. public class Tiger extends Animal {

  6. 5. interface Animal {

9. public class Tiger subclasses Animal {

Answer: B

Question No: 135 – (Topic 2)

Given:

  1. interface Pet {

  2. void eat(); 5. }

  1. class Dog implements Pet { public void eat() { } }

  2. class Beagle extends Dog { public void eat() { } }

    Which demonstrates the quot;program to an interfacequot; principle?

    1. class PetFood extends Pet { public void go(PetFood d) {

    2. eat();

      }

    3. class PetFood { public void go(Dog d) {

    4. eat();

      }

    5. class PetFood {

      public void go(Beagle b) {

    6. eat();

      }

    7. interface PetFood implements Pet { public void go(Pet d) {

    8. eat();

      }

    9. class PetFood { public void go(Pet p) {

    10. eat();

}

Answer: E

Question No: 136 – (Topic 2)

You need to create a class Foo that will record the number of times the go() method is invoked on a particular instance of the class. Which solution correctly implements this goal?

  1. Declare a local variable invokeCount inside the go() method, and increment the variable within the go() method.

  2. Declare a static variable invokeCount for the class Foo, and increment the variable within the go() method.

  3. Declare a method parameter invokeCount as the argument to the go() method, and increment the variable within the go() method.

  4. Declare an instance variable invokeCount for the class Foo, and increment the variable within the go() method.

Answer: D

Question No: 137 – (Topic 2)

Which two are true about the Swing API? (Choose two.)

  1. Swing classes are located in the java.awt package.

  2. Swing is considered more quot;lightweightquot; than AWT.

  3. Swing provides more GUI components than AWT.

  4. Swing can be used without AWT.

Answer: B,C

Question No: 138 – (Topic 2)

Click the Exhibit button.

Which diagram best represents the relationship quot;A Dog has four Legsquot; based on the definitions of association and composition?

Ensurepass 2017 PDF and VCE

  1. A

  2. C

  3. D

  4. B

    Answer: A

    Question No: 139 – (Topic 2)

    Given:

    1. interface Flyer {

    2. void takeOff();

    3. boolean land(); 4. }

  1. class Airplane implements Flyer {

  2. public void takeOff() { /* some code */ }

  3. // insert code here

  4. return true; 9. }

    10. }

    Which, inserted at line 8, correctly implements the interface?

    1. boolean land(int i) {

    2. public void land() {

    3. protected boolean land() {

    4. public boolean land() {

    5. boolean land() {

Answer: D

Question No: 140 – (Topic 2)

Which statement about threading in Java is false?

  1. Threads waiting to be executed are generally chosen for execution based on priority.

  2. The synchronized keyword is used to lock objects.

  3. A thread is a special type of method.

  4. A thread whose execution has completed is no longer runnable.

Answer: C

100% Ensurepass Free Download!
Download Free Demo:1z0-850 Demo PDF
100% Ensurepass Free Guaranteed!
Download 2017 EnsurePass 1z0-850 Dumps

EnsurePass ExamCollection Testking
Lowest Price Guarantee Yes No No
Up-to-Dated Yes No No
Real Questions Yes No No
Explanation Yes No No
PDF VCE Yes No No
Free VCE Simulator Yes No No
Instant Download Yes No No

2017 EnsurePass IT Certification PDF and VCE

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.