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

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: 51 – (Topic 1)

Given:

  1. public class TestString1 {

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

  3. String str = quot;420quot;; 4. str = 42;

  1. System.out.print(str); 6. }

    7. }

    What is the output?

    1. Compilation fails.

B. 42042

C. An exception is thrown at runtime.

D. 462

  1. 42

    F. 420

    Answer: B

    Question No: 52 – (Topic 1)

    Given a correctly compiled class whose source code is:

    1. package com.sun.sjcp;

    2. public class Commander {

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

    4. // more code here 5. }

      6. }

      Assume that the class file is located in /foo/com/sun/sjcp/, the current directory is /foo/, and that the classpath contains quot;.quot; (current directory).

      Which command line correctly runs Commander?

      1. java Commander

      2. java com/sun/sjcp/Commander

      3. java com.sun.sjcp.Commander

      4. java -cp com/sun/sjcp Commander

      5. java -cp com.sun.sjcp Commander

        Answer: C

        Question No: 53 – (Topic 1)

        Given a class Repetition:

        1. package utils; 2.

  1. public class Repetition {

  2. public static String twice(String s) { return s s; } 5. }

and given another class Demo:

1. // insert code here 2.

  1. public class Demo {

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

  3. System.out.println(twice(quot;pizzaquot;)); 6. }

    7. }

    Which code should be inserted at line 1 of Demo.java to compile and run Demo to print quot;pizzapizzaquot;?

    1. import static utils.Repetition.twice;

    2. static import utils.*;

    3. static import utils.Repetition.*;

    4. import utils.Repetition.*;

    5. import utils.*;

    6. import utils.Repetition.twice();

    7. static import utils.Repetition.twice;

Answer: A

Question No: 54 DRAG DROP – (Topic 1)

Click the Task button.

Ensurepass 2018 PDF and VCE

Answer:

Ensurepass 2018 PDF and VCE

Question No: 55 – (Topic 1)

Given

  1. public interface Status {

  2. /* insert code here */ int MY_VALUE = 10;

13. }

Which three are valid on line 12? (Choose three.)

  1. static

  2. native

  3. abstract

  4. final

  5. private

  6. protected

  7. public

Answer: A,D,G

Question No: 56 – (Topic 1)

Which three will compile and run without exception? (Choose three.)

  1. void go() {

    synchronized() { /* code here */ }

  2. private synchronized(this) void go() { /* code here */ }

  3. void go() {

    Object o = new Object(); synchronized(o) { /* code here */ }

  4. private synchronized Object o;

  5. void go() {

    synchronized(Object.class) { /* code here */ }

  6. public synchronized void go() { /* code here */ }

    Answer: C,E,F

    Question No: 57 – (Topic 1)

    Given:

    1. import java.util.*;

    2. public class Old {

    3. public static Object get0(List list) {

    4. return list.get(0); 5. }

      6. }

      Which three will compile successfully? (Choose three.)

      1. String s = Old.get0(new LinkedListlt;Stringgt;());

      2. String s = (String)Old.get0(new LinkedListlt;Stringgt;());

      3. Object o = Old.get0(new LinkedListlt;?gt;());

      4. Object o = Old.get0(new LinkedListlt;Objectgt;());

      5. Object o = Old.get0(new LinkedList());

Answer: B,D,E

Question No: 58 – (Topic 1)

Given:

  1. class One {

  2. public One() { System.out.print(1); }

12. }

  1. class Two extends One {

  2. public Two() { System.out.print(2); }

15. }

  1. class Three extends Two {

  2. public Three() { System.out.print(3); }

18. }

  1. public class Numbers{

  2. public static void main( String[] argv ) { new Three(); }

21. }

What is the result when this code is executed?

A. 321

  1. 3

  2. 1

D. 123

E. The code runs with no output.

Answer: D

Question No: 59 – (Topic 1)

Given:

  1. package com.sun.scjp;

  2. public class Geodetics {

  3. public static final double DIAMETER = 12756.32; // kilometers

13. }

Which two correctly access the DIAMETER member of the Geodetics class? (Choose two.)

  1. import static com.sun.scjp.Geodetics.*; public class TerraCarta {

    public double halfway() { return DIAMETER/2.0; } }

  2. package com.sun.scjp; public class TerraCarta {

    public double halfway() { return DIAMETER/2.0; } }

  3. import static com.sun.scjp.Geodetics; public class TerraCarta{

    public double halfway() { return DIAMETER/2.0; } }

  4. import com.sun.scjp.Geodetics; public class TerraCarta {

public double halfway()

{ return Geodetics.DIAMETER/2.0; }

Answer: A,D

Question No: 60 – (Topic 1)

Given:

enum Example { ONE, TWO, THREE } Which statement is true?

  1. The expressions (ONE == ONE) and ONE.equals(ONE) are both guaranteed to be true.

  2. The Example values cannot be used in a raw java.util.HashMap; instead, the programmer must use a java.util.EnumMap.

  3. The expression (ONE lt; TWO) is guaranteed to be true and ONE.compareTo(TWO) is guaranteed to be less than one.

  4. The Example values can be used in a java.util.SortedSet, but the set will NOT be sorted because enumerated types do NOT implement java.lang.Comparable.

Answer: A

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.