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: 81 – (Topic 1)
Given:
11. public class Yikes { 12.
-
public static void go(Long n) {System.out.println(quot;Long quot;);}
-
public static void go(Short n) {System.out.println(quot;Short quot;);}
-
public static void go(int n) {System.out.println(quot;int quot;);}
-
public static void main(String [] args) {
-
short y = 6;
-
long z = 7;
-
go(y);
-
go(z);
21. }
22. }
What is the result?
-
An exception is thrown at runtime.
-
Short Long
-
Compilation fails.
-
int Long
Answer: D
Question No: 82 DRAG DROP – (Topic 1)
Click the Task button.
Answer:
Question No: 83 – (Topic 1)
Given:
-
public class Threads2 implements Runnable { 2.
-
-
public void run() {
-
System.out.println(quot;run.quot;);
-
throw new RuntimeException(quot;Problemquot;); 6. }
-
public static void main(String[] args) {
-
Thread t = new Thread(new Threads2());
-
t.start();
-
System.out.println(quot;End of method.quot;);
11. }
12. }
Which two can be results? (Choose two.)
-
java.lang.RuntimeException: Problem
-
run.
java.lang.RuntimeException: Problem
-
End of method. java.lang.RuntimeException: Problem
-
run.
java.lang.RuntimeException: Problem End of method.
-
End of method. run.
java.lang.RuntimeException: Problem
Answer: D,E
Question No: 84 – (Topic 1)
Given:
-
public class Pass {
-
public static void main(String [] args) {
-
int x = 5;
-
Pass p = new Pass();
-
p.doStuff(x);
-
System.out.print(quot; main x = quot; x);
19. } 20.
-
void doStuff(int x) {
-
System.out.print(quot; doStuff x = quot; x );
23. }
24. }
What is the result?
-
An exception is thrown at runtime.
-
doStuff x = 6 main x = 6
-
doStuff x = 5 main x = 5
-
Compilation fails.
-
doStuff x = 6 main x = 5
-
doStuff x = 5 main x = 6
Answer: C
Question No: 85 – (Topic 1)
A class games.cards.Poker is correctly defined in the jar file Poker.jar. A user wants to execute the main method of Poker on a UNIX system using the command:
java games.cards.Poker
What allows the user to do this?
-
put Poker.jar in directory /stuff/java/games/cards, and set the CLASSPATH to include
/stuff/java/*.jar
-
put Poker.jar in directory /stuff/java/games/cards, and set the CLASSPATH to include
/stuff/java
-
put Poker.jar in directory /stuff/java/games/cards, and set the CLASSPATH to include
/stuff/java/Poker.jar
-
Put Poker.jar in directory /stuff/java, and set the CLASSPATH to include
/stuff/java/Poker.jar
-
put Poker.jar in directory /stuff/java, and set the CLASSPATH to include /stuff/java/*.jar
-
put Poker.jar in directory /stuff/java, and set the CLASSPATH to include /stuff/java
Answer: D
Question No: 86 – (Topic 1)
Assuming that the serializeBanana() and the deserializeBanana() methods will correctly use Java serialization and given:
-
import java.io.*;
-
class Food implements Serializable {int good = 3;}
-
class Fruit extends Food {int juice = 5;}
-
public class Banana extends Fruit {
-
int yellow = 4;
-
public static void main(String [] args) {
-
Banana b = new Banana(); Banana b2 = new Banana();
-
b.serializeBanana(b); // assume correct serialization
-
b2 = b.deserializeBanana(); // assume correct
-
System.out.println(quot;restore quot; b2.yellow b2.juice b2.good);
24. }
25. // more Banana methods go here 50. } What is the result?
-
restore 403
-
An exception is thrown at runtime.
-
restore 453
-
Compilation fails.
-
restore 400
Answer: C
Question No: 87 – (Topic 1)
Given classes defined in two different files:
-
package util;
-
public class BitUtils {
-
public static void process(byte[]) { /* more code here */ } 4. }
-
-
package app;
-
public class SomeApp {
-
public static void main(String[] args) {
-
byte[] bytes = new byte[256];
-
// insert code here 6. }
7. }
What is required at line 5 in class SomeApp to use the process method of BitUtils?
-
process(bytes);
-
import util.BitUtils.*; process(bytes);
-
BitUtils.process(bytes);
-
SomeApp cannot use methods in BitUtils.
-
util.BitUtils.process(bytes);
-
Answer: E
Question No: 88 – (Topic 1)
Given:
-
String csv = quot;Sue,5,true,3quot;;
-
Scanner scanner = new Scanner( csv );
-
scanner.useDelimiter(quot;,quot;);
-
int age = scanner.nextInt(); What is the result?
-
After line 15, the value of age is 3.
-
Compilation fails.
-
An exception is thrown at runtime.
-
After line 15, the value of age is 5.
Answer: C
Question No: 89 – (Topic 1)
Given:
-
class Super {
-
private int a;
-
protected Super(int a) { this.a = a; } 4. }
-
…
-
class Sub extends Super {
-
public Sub(int a) { super(a); }
-
public Sub() { this.a = 5; }
14. }
Which two, independently, will allow Sub to compile? (Choose two.)
-
Change line 2 to: protected int a;
-
Change line 13 to: public Sub() { super(a); }
-
Change line 13 to: public Sub() { this(5); }
-
Change line 13 to: public Sub() { super(5); }
-
Change line 2 to: public int a;
Answer: C,D
Question No: 90 – (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. 1
B. 321
-
3
-
The code runs with no output.
E. 123
Answer: E
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