[Free] 2018(Jan) EnsurePass Testinsides Oracle 1z0-853 Dumps with VCE and PDF 41-50

By | January 25, 2018

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

Java Standard Edition 5 Programmer Certified Professional Exam

Question No: 41 – (Topic 1)

Given:

  1. public class Plant {

  2. private String name;

  3. public Plant(String name) { this.name = name; }

  4. public String getName() { return name; } 5. }

  1. public class Tree extends Plant {

  2. public void growFruit() { }

  3. public void dropLeaves() { } 4. }

    Which statement is true?

    1. The code will compile if public Tree() { Plant(); } is added to the Tree class.

    2. The code will compile if public Plant() { this(quot;fernquot;); } is added to the Plant class.

    3. The code will compile without changes.

    4. The code will compile if public Plant() { Tree(); } is added to the Plant class.

    5. The code will compile if public Plant() { Plant(quot;fernquot;); } is added to the Plant class.

      Answer: B

      Question No: 42 – (Topic 1)

      Given:

      1. public interface A {

      2. String DEFAULT_GREETING = quot;Hello Worldquot;;

      3. public void method1(); 4. }

        A programmer wants to create an interface called B that has A as its parent. Which interface declaration is correct?

        1. public interface B extends A {}

        2. public interface B inheritsFrom A {}

        3. public interface B implements A {}

        4. public interface B instanceOf A {}

Answer: A

Question No: 43 DRAG DROP – (Topic 1)

Click the Task button.

Ensurepass 2018 PDF and VCE

Answer:

Ensurepass 2018 PDF and VCE

Question No: 44 – (Topic 1)

Given:

  1. rbo = new ReallyBigObject();

  2. // more code here

  3. rbo = null;

  4. /* insert code here */

Which statement should be placed at line 14 to suggest that the virtual machine expend effort toward recycling the memory used by the object rbo?

  1. System.freeMemory();

  2. Runtime.gc();

  3. Runtime.getRuntime().freeMemory();

  4. Runtime.getRuntime().growHeap();

  5. System.gc();

Answer: E

Question No: 45 – (Topic 1)

Given:

  1. class A {

  2. public void process() { System.out.print(quot;A,quot;); }

  3. class B extends A {

  4. public void process() throws IOException {

  5. super.process();

  6. System.out.print(quot;B,quot;);

  7. throw new IOException();

18. }

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

  2. try { new B().process(); }

  3. catch (IOException e) { System.out.println(quot;Exceptionquot;); } What is the result?

  1. A NullPointerException is thrown at runtime.

  2. A,B,Exception

  3. Compilation fails because of an error in line 14.

  4. Compilation fails because of an error in line 20.

  5. Exception

Answer: C

Question No: 46 – (Topic 1)

Which two statements are true about has-a and is-a relationships? (Choose two.)

  1. Interfaces must be used when creating a has-a relationship.

  2. Instance variables can be used when creating a has-a relationship.

  3. Inheritance represents an is-a relationship.

  4. Inheritance represents a has-a relationship.

Answer: B,C

Question No: 47 DRAG DROP – (Topic 1)

Click the Task button.

Ensurepass 2018 PDF and VCE

Answer:

Ensurepass 2018 PDF and VCE

Question No: 48 DRAG DROP – (Topic 1)

Click the Task button.

Ensurepass 2018 PDF and VCE

Answer:

Ensurepass 2018 PDF and VCE

Question No: 49 – (Topic 1)

Click the Exhibit button.

Which two statements are true if this class is compiled and run? (Choose two.)

Ensurepass 2018 PDF and VCE

  1. The code may run with no output, exiting normally.

  2. The code may run with output quot;A A A B C A B C C quot;, then exit.

  3. The code may run with output quot;A B A B C C quot;, then exit.

  4. An exception may be thrown at runtime.

  5. The code may run with no output, without exiting.

  6. The code may run with output quot;A B C A B C A B C quot;, then exit.

  7. The code may run with output quot;A B C A A B C A B C quot;, then exit.

Answer: F,G

Question No: 50 – (Topic 1)

Click the Exhibit button. Given:

ClassA a = new ClassA(); a.methodA();

What is the result?

Ensurepass 2018 PDF and VCE

  1. Compilation fails.

  2. ClassC is displayed.

  3. The code runs with no output.

  4. An exception is thrown at runtime.

    Answer: D

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

Leave a Reply

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