[Free] 2017(Jan) EnsurePass Testinsides Oracle 1z0-852 Dumps with VCE and PDF Download 1-10

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

Java Standard Edition 6 Programmer Certified Professional Upgrade Exam

Question No: 1

Given:

  1. public class Base {

  2. public static final String FOO = quot;fooquot;;

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

  4. Base b = new Base();

  5. Sub s = new Sub();

  6. System.out.print(Base.FOO);

  7. System.out.print(Sub.FOO);

  8. System.out.print(b.FOO);

  9. System.out.print(s.FOO);

  10. System.out.print(((Base)s).FOO); 11. } }

12. class Sub extends Base {public static final String FOO=quot;barquot;;} What is the result?

  1. foofoofoofoofoo

  2. foobarfoobarbar

  3. foobarfoofoofoo

  4. foobarfoobarfoo

  5. barbarbarbarbar

  6. foofoofoobarbar

  7. foofoofoobarfoo

Answer: D

Question No: 2

A company has a business application that provides its users with many different reports:

receivables reports, payables reports, revenue projects, and so on. The company has just purchased some new, state-of-the-art, wireless printers, and a programmer has been assigned the task of enhancing all of the reports to use not only the company#39;s old printers, but the new wireless printers as well. When the programmer starts looking into the application, the programmer discovers that because of the design of the application, it is necessary to make changes to eachreport to support the new printers. Which two design concepts most likely explain this situation? (Choose two.)

  1. Inheritance

  2. Low cohesion

  3. Tight coupling

  4. High cohesion

  5. Loose coupling

  6. Object immutability

Answer: B,C

Question No: 3

Given:

  1. class Building { }

  2. public class Barn extends Building {

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

  4. Building build1 = new Building();

  5. Barn barn1 = new Barn();

  6. Barn barn2 = (Barn) build1;

  7. Object obj1 = (Object) build1;

  8. String str1 = (String) build1;

  9. Building build2 = (Building) barn1;

14. }

15. }

Which is true?

  1. If line 10 is removed, the compilation succeeds.

  2. If line 11 is removed, the compilation succeeds.

  3. If line 12 is removed, the compilation succeeds.

  4. If line 13 is removed, the compilation succeeds.

  5. More than one line must be removed for compilation to succeed.

Answer: C

Question No: 4

Given:

  1. abstract class A {

  2. abstract void a1();

  3. void a2() { }

13. }

  1. class B extends A {

  2. void a1() { }

  3. void a2() { }

17. }

18. class C extends B { void c1() { } } and:

A x = new B(); C y = new C(); A z = new C();

What are four valid examples of polymorphic method calls? (Choose four.)

A. x.a2();

B. z.a2();

C. z.c1();

D. z.a1();

E. y.c1();

F. x.a1();

Answer: A,B,D,F

Question No: 5

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#39;s chief scientist has just improved the performance of one of the utility classes#39; 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#39;s API, and replaces the old algorithm with the new algorithm, being careful that her changes adhere strictly to the class#39;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?

  1. Inheritance

  2. Tight coupling

  3. Low cohesion

  4. High cohesion

  5. Loose coupling

  6. Object immutability

Answer: B

Question No: 6

Given:

11. class Mammal { } 12.

  1. class Raccoon extends Mammal {

  2. Mammal m = new Mammal();

15. } 16.

17. class BabyRaccoon extends Mammal { } Which four statements are true? (Choose four.)

  1. Raccoon is-a Mammal.

  2. Raccoon has-a Mammal.

  3. BabyRaccoon is-a Mammal.

  4. BabyRaccoon is-a Raccoon.

  5. BabyRaccoon has-a Mammal.

  6. BabyRaccoon is-a BabyRaccoon.

Answer: A,B,C,F

Question No: 7

Given:

  1. public class Hi {

  2. void m1() { }

  3. protected void() m2 { }

  4. } 6. class Lois extends Hi {

  1. // insert code here 8. }

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

    1. public void m1() { }

    2. protected void m1() { }

    3. private void m1() { }

    4. void m2() { }

    5. public void m2() { }

    6. protected void m2() { }

    7. private void m2() { }

Answer: A,B,E,F

Question No: 8

Given that:

Gadget has-a Sprocket and Gadget has-a Spring and Gadget is-a Widget and Widget has-a Sprocket

Which two code fragments represent these relationships? (Choose two.)

  1. class Widget { Sprocket s; }

    class Gadget extends Widget { Spring s; }

  2. class Widget { }

    class Gadget extends Widget { Spring s1; Sprocket s2; }

  3. class Widget { Sprocket s1; Spring s2; } class Gadget extends Widget { }

  4. class Gadget { Spring s; }

    class Widget extends Gadget{ Sprocket s; }

  5. class Gadget { }

    class Widget extends Gadget{ Sprocket s1; Spring s2; }

  6. class Gadget { Spring s1; Sprocket s2; } class Widget extends Gadget{ }

Answer: A,C

Question No: 9

Given the following six method names:

addListener addMouseListener setMouseListener deleteMouseListener removeMouseListener registerMouseListener

How many of these method names follow JavaBean Listener naming rules?

  1. 1

  2. 2

  3. 3

  4. 4

  5. 5

Answer: B

Question No: 10

Click the Exhibit button.

Which three statements are true? (Choose three.)

Ensurepass 2017 PDF and VCE

  1. Compilation fails.

  2. The code compiles and the output is 2.

  3. If lines 16, 17 and 18 were removed, compilation would fail.

  4. If lines 24, 25 and 26 were removed, compilation would fail.

  5. If lines 16, 17 and 18 were removed, the code would compile and the output would be 2.

  6. If lines 24, 25 and 26 were removed, the code would compile and the output would be 1.

    Answer: B,E,F

    100% Ensurepass Free Download!
    Download Free Demo:1z0-852 Demo PDF
    100% Ensurepass Free Guaranteed!
    Download 2017 EnsurePass 1z0-852 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

Add a Comment

Your email address will not be published. Required fields are marked *

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