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: 91 – (Topic 1)
Given:
-
public static Collection get() {
-
Collection sorted = new LinkedList();
-
sorted.add(quot;Bquot;); sorted.add(quot;Cquot;); sorted.add(quot;Aquot;);
-
return sorted;
15. }
-
public static void main(String[] args) {
-
for (Object obj: get()) {
-
System.out.print(obj quot;, quot;);
19. }
20. }
What is the result?
-
Compilation fails.
-
A, B, C,
-
The code runs with no output.
-
An exception is thrown at runtime.
-
B, C, A,
Answer: E
Question No: 92 – (Topic 1)
Click the Exhibit button. Given this code from Class B:
-
A a1 = new A();
-
A a2 = new A();
-
A a3 = new A();
-
System.out.println(A.getInstanceCount()); What is the result?
-
Compilation fails because of an error on line 28.
-
Line 28 prints the value 3 to System.out.
-
Compilation of class A fails.
-
Line 28 prints the value 1 to System.out.
-
A runtime error occurs when line 25 executes.
Answer: C
Question No: 93 – (Topic 1)
Given:
-
package test; 2.
-
-
class Target {
-
public String name = quot;helloquot;; 5. }
What can directly access and change the value of the variable name?
-
only the Target class
-
any class in the test package
-
any class that extends Target
-
any class
Answer: B
Question No: 94 – (Topic 1)
Given:
-
public class Plant {
-
private String name;
-
public Plant(String name) { this.name = name; }
-
public String getName() { return name; } 5. }
-
-
-
public class Tree extends Plant {
-
public void growFruit() { }
-
public void dropLeaves() { } 4. }
Which statement is true?
-
The code will compile if public Plant() { this(quot;fernquot;); } is added to the Plant class.
-
The code will compile if public Plant() { Tree(); } is added to the Plant class.
-
The code will compile if public Plant() { Plant(quot;fernquot;); } is added to the Plant class.
-
The code will compile without changes.
-
The code will compile if public Tree() { Plant(); } is added to the Tree class.
Answer: A
Question No: 95 DRAG DROP – (Topic 1)
Click the Task button.
Answer:
Question No: 96 – (Topic 1)
Given:
-
class SuperClass {
-
public A getA() {
-
return new A(); 4. }
-
-
5. }
-
class SubClass extends SuperClass {
-
public B getA(){
-
return new B(); 9. }
10. }
Which statement is true?
-
Compilation will always fail because of an error in line 8.
-
Compilation will succeed if A extends B.
-
Compilation will succeed if B extends A.
-
Compilation will always fail because of an error in line 7.
-
Answer: C
Question No: 97 DRAG DROP – (Topic 1)
Click the Task button.
Answer:
Question No: 98 – (Topic 1)
Given:
-
class Line {
-
public class Point { public int x,y;}
-
public Point getPoint() { return new Point(); }
13. }
-
class Triangle {
-
public Triangle() {
-
// insert code here
17. }
18. }
Which code, inserted at line 16, correctly retrieves a local instance of a Point object?
-
Line.Point p = Line.getPoint();
-
Point p = (new Line()).getPoint();
-
Point p = Line.getPoint();
-
Line.Point p = (new Line()).getPoint();
Answer: D
Question No: 99 – (Topic 1)
Given:
-
public class Threads4 {
-
public static void main (String[] args) {
-
new Threads4().go(); 4. }
-
-
public void go() {
-
Runnable r = new Runnable() {
-
public void run() {
-
System.out.print(quot;fooquot;); 9. }
10. };
-
Thread t = new Thread(r);
-
t.start();
-
t.start();
14. }
15. }
What is the result?
-
An exception is thrown at runtime.
-
The code executes normally, but nothing is printed.
-
Compilation fails.
-
The code executes normally and prints quot;fooquot;.
Answer: A
Question No: 100 – (Topic 1)
Which three statements are true? (Choose three.)
-
A public static method in class X can be called by a subclass of X without explicitly referencing the class X.
-
A non-static public final method in class X can be overridden in any subclass of X.
-
A private static method can be called only within other static methods in class X.
-
A protected method in class X can be overridden by any subclass of X.
-
A protected method in class X can be overridden by a subclass of A only if the subclass is in the same package as X.
-
A method with the same signature as a private final method in class X can be implemented in a subclass of X.
-
A final method in class X can be abstract if and only if X is abstract.
Answer: A,D,F
Topic 2, Volume B
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 |
100-105 Dumps VCE PDF
200-105 Dumps VCE PDF
300-101 Dumps VCE PDF
300-115 Dumps VCE PDF
300-135 Dumps VCE PDF
300-320 Dumps VCE PDF
400-101 Dumps VCE PDF
640-911 Dumps VCE PDF
640-916 Dumps VCE PDF
70-410 Dumps VCE PDF
70-411 Dumps VCE PDF
70-412 Dumps VCE PDF
70-413 Dumps VCE PDF
70-414 Dumps VCE PDF
70-417 Dumps VCE PDF
70-461 Dumps VCE PDF
70-462 Dumps VCE PDF
70-463 Dumps VCE PDF
70-464 Dumps VCE PDF
70-465 Dumps VCE PDF
70-480 Dumps VCE PDF
70-483 Dumps VCE PDF
70-486 Dumps VCE PDF
70-487 Dumps VCE PDF
220-901 Dumps VCE PDF
220-902 Dumps VCE PDF
N10-006 Dumps VCE PDF
SY0-401 Dumps VCE PDF