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:
-
public class TestString1 {
-
public static void main(String[] args) {
-
String str = quot;420quot;; 4. str = 42;
-
System.out.print(str); 6. }
7. }
What is the output?
-
Compilation fails.
-
B. 42042
C. An exception is thrown at runtime.
D. 462
-
42
F. 420
Answer: B
Question No: 52 – (Topic 1)
Given a correctly compiled class whose source code is:
-
package com.sun.sjcp;
-
public class Commander {
-
public static void main(String[] args) {
-
// 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?
-
java Commander
-
java com/sun/sjcp/Commander
-
java com.sun.sjcp.Commander
-
java -cp com/sun/sjcp Commander
-
java -cp com.sun.sjcp Commander
Answer: C
Question No: 53 – (Topic 1)
Given a class Repetition:
-
package utils; 2.
-
-
-
-
public class Repetition {
-
public static String twice(String s) { return s s; } 5. }
and given another class Demo:
1. // insert code here 2.
-
public class Demo {
-
public static void main(String[] args) {
-
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;?
-
import static utils.Repetition.twice;
-
static import utils.*;
-
static import utils.Repetition.*;
-
import utils.Repetition.*;
-
import utils.*;
-
import utils.Repetition.twice();
-
static import utils.Repetition.twice;
-
Answer: A
Question No: 54 DRAG DROP – (Topic 1)
Click the Task button.
Answer:
Question No: 55 – (Topic 1)
Given
-
public interface Status {
-
/* insert code here */ int MY_VALUE = 10;
13. }
Which three are valid on line 12? (Choose three.)
-
static
-
native
-
abstract
-
final
-
private
-
protected
-
public
Answer: A,D,G
Question No: 56 – (Topic 1)
Which three will compile and run without exception? (Choose three.)
-
void go() {
synchronized() { /* code here */ }
-
private synchronized(this) void go() { /* code here */ }
-
void go() {
Object o = new Object(); synchronized(o) { /* code here */ }
-
private synchronized Object o;
-
void go() {
synchronized(Object.class) { /* code here */ }
-
public synchronized void go() { /* code here */ }
Answer: C,E,F
Question No: 57 – (Topic 1)
Given:
-
import java.util.*;
-
public class Old {
-
public static Object get0(List list) {
-
return list.get(0); 5. }
6. }
Which three will compile successfully? (Choose three.)
-
String s = Old.get0(new LinkedListlt;Stringgt;());
-
String s = (String)Old.get0(new LinkedListlt;Stringgt;());
-
Object o = Old.get0(new LinkedListlt;?gt;());
-
Object o = Old.get0(new LinkedListlt;Objectgt;());
-
Object o = Old.get0(new LinkedList());
-
-
Answer: B,D,E
Question No: 58 – (Topic 1)
Given:
-
class One {
-
public One() { System.out.print(1); }
12. }
-
class Two extends One {
-
public Two() { System.out.print(2); }
15. }
-
class Three extends Two {
-
public Three() { System.out.print(3); }
18. }
-
public class Numbers{
-
public static void main( String[] argv ) { new Three(); }
21. }
What is the result when this code is executed?
A. 321
-
3
-
1
D. 123
E. The code runs with no output.
Answer: D
Question No: 59 – (Topic 1)
Given:
-
package com.sun.scjp;
-
public class Geodetics {
-
public static final double DIAMETER = 12756.32; // kilometers
13. }
Which two correctly access the DIAMETER member of the Geodetics class? (Choose two.)
-
import static com.sun.scjp.Geodetics.*; public class TerraCarta {
public double halfway() { return DIAMETER/2.0; } }
-
package com.sun.scjp; public class TerraCarta {
public double halfway() { return DIAMETER/2.0; } }
-
import static com.sun.scjp.Geodetics; public class TerraCarta{
public double halfway() { return DIAMETER/2.0; } }
-
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?
-
The expressions (ONE == ONE) and ONE.equals(ONE) are both guaranteed to be true.
-
The Example values cannot be used in a raw java.util.HashMap; instead, the programmer must use a java.util.EnumMap.
-
The expression (ONE lt; TWO) is guaranteed to be true and ONE.compareTo(TWO) is guaranteed to be less than one.
-
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 |
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