[Free] 2017(Jan) EnsurePass Braindumps Oracle 1z0-853 Dumps with VCE and PDF 1-10

Ensurepass.com : Ensure you pass the IT Exams
2017 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: 1 – (Topic 1)

Given:

  1. class One {

  2. void foo() { }

12. }

  1. class Two extends One {

  2. //insert method here

15. }

Which three methods, inserted individually at line 14, will correctly complete class Two? (Choose three.)

  1. public void foo() { /* more code here */ }

  2. private void foo() { /* more code here */ }

  3. protected void foo() { /* more code here */ }

  4. int foo() { /* more code here */ }

  5. void foo() { /* more code here */ }

Answer: A,C,E

Question No: 2 – (Topic 1)

Which two code fragments correctly create and initialize a static array of int elements? (Choose two.)

  1. static final int[] a = { 100,200 };

  2. static final int[] a;

    static { a=new int[2]; a[0]=100; a[1]=200; }

  3. static final int[] a;

    static void init() { a = new int[3]; a[0]=100; a[1]=200; }

  4. static final int[] a = new int[2]{ 100,200 };

Answer: A,B

Question No: 3 – (Topic 1)

Click the Exhibit button. Given this code from Class B:

  1. A a1 = new A();

  2. A a2 = new A();

  3. A a3 = new A();

  4. System.out.println(A.getInstanceCount()); What is the result?

Ensurepass 2017 PDF and VCE

  1. Compilation of class A fails.

  2. Line 28 prints the value 3 to System.out.

  3. Line 28 prints the value 1 to System.out.

  4. Compilation fails because of an error on line 28.

  5. A runtime error occurs when line 25 executes.

Answer: A

Question No: 4 – (Topic 1)

Given:

20. public class CreditCard { 21.

  1. private String cardID;

  2. private Integer limit;

  3. public String ownerName; 25.

  1. public void setCardInformation(String cardID,

  2. String ownerName,

  3. Integer limit) {

  4. this.cardID = cardID;

  5. this.ownerName = ownerName;

  6. this.limit = limit;

32. }

33. }

Which statement is true?

  1. The cardID and limit variables break polymorphism.

  2. The code demonstrates polymorphism.

  3. The ownerName variable breaks encapsulation.

  4. The setCardInformation method breaks encapsulation.

  5. The class is fully encapsulated.

Answer: C

Question No: 5 – (Topic 1)

Given:

11. public class Yikes { 12.

  1. public static void go(Long n) {System.out.println(quot;Long quot;);}

  2. public static void go(Short n) {System.out.println(quot;Short quot;);}

  3. public static void go(int n) {System.out.println(quot;int quot;);}

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

  5. short y = 6;

  6. long z = 7;

  7. go(y);

  8. go(z);

21. }

22. }

What is the result?

  1. An exception is thrown at runtime.

  2. int Long

  3. Compilation fails.

  4. Short Long

Answer: B

Question No: 6 – (Topic 1)

Given:

  1. public class ItemTest {

  2. private final int id;

  3. public ItemTest(int id) { this.id = id; }

  4. public void updateId(int newId) { id = newId; }

15.

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

  2. ItemTest fa = new ItemTest(42);

  3. fa.updateId(69);

  4. System.out.println(fa.id);

20. }

21. }

What is the result?

  1. A new Item object is created with the preferred value in the id attribute.

  2. The attribute id in the Item object is modified to the new value.

  3. Compilation fails.

  4. An exception is thrown at runtime.

  5. The attribute id in the Item object remains unchanged.

Answer: C

Question No: 7 – (Topic 1)

Click the Exhibit button. Given:

  1. try {

  2. A a = new A();

  3. a.method1();

  4. } catch (Exception e) {

  5. System.out.print(quot;an error occurredquot;);

30. }

Which two statements are true if a NullPointerException is thrown on line 3 of class C?

(Choose two.)

Ensurepass 2017 PDF and VCE

  1. The application will crash.

  2. The code on line 29 will be executed.

  3. The code on line 5 of class A will execute.

  4. The exception will be propagated back to line 27.

  5. The code on line 5 of class B will execute.

Answer: B,D

Question No: 8 – (Topic 1)

Given:

10. interface Jumper { public void jump(); }

20. class Animal {}

  1. class Dog extends Animal {

  2. Tail tail;

32. }

  1. class Beagle extends Dog implements Jumper{

  2. public void jump() {} 42. }

  1. class Cat implements Jumper{

  2. public void jump() {}

52. }

Which three are true? (Choose three.)

  1. Cat is-a Jumper

  2. Cat is-a Animal

  3. Dog is-a Jumper

  4. Dog is-a Animal

  5. Beagle has-a Jumper

  6. Cat has-a Animal

  7. Beagle has-a Tail

Answer: A,D,G

Question No: 9 – (Topic 1)

Given:

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

  2. Object obj = new int[] { 1, 2, 3 };

  3. int[] someArray = (int[])obj;

  4. for (int i : someArray) System.out.print(i quot; quot;);

15. }

What is the result?

  1. Compilation fails because of an error in line 13.

  2. A ClassCastException is thrown at runtime.

C. 1 2 3

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

  2. Compilation fails because of an error in line 12.

Answer: C

Question No: 10 – (Topic 1)

Given:

  1. class Line {

  2. public static class Point {}

12. } 13.

  1. class Triangle {

  2. // insert code here

16. }

Which code, inserted at line 15, creates an instance of the Point class defined in Line?

  1. Line l = new Line() ; l.Point p = new l.Point();

  2. Line.Point p = new Line.Point();

  3. The Point class cannot be instatiated at line 15.

  4. Point p = new Point();

Answer: B

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

2017 EnsurePass IT Certification PDF and VCE

Leave a Reply

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