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: 211 – (Topic 3)
Given:
11. Float pi = new Float(3.14f);
12. if (pi gt; 3) {
13. System.out.print(quot;pi is bigger than 3. quot;);
14. }
-
else {
-
System.out.print(quot;pi is not bigger than 3. quot;);
17. }
-
finally {
-
System.out.println(quot;Have a nice day.quot;);
20. }
What is the result?
-
pi is not bigger than 3. Have a nice day.
-
pi is bigger than 3. Have a nice day.
-
Compilation fails.
-
pi is bigger than 3.
-
An exception occurs at runtime.
Answer: C
Question No: 212 – (Topic 3)
Given:
-
public class test {
-
public static void main(String [] a) {
-
assert a.length == 1;
11. }
12. }
Which two will produce an AssertionError? (Choose two.)
-
java -ea test file1 file2
-
java -ea test
-
java test
-
java test file1
-
java -ea test file1
-
java -ea:test test file1
Answer: A,B
Question No: 213 DRAG DROP – (Topic 3)
Click the Task button.
Answer:
Question No: 214 DRAG DROP – (Topic 3)
Click the Task button.
Answer:
Question No: 215 – (Topic 3)
Given:
-
class TestA {
-
public void start() { System.out.println(quot;TestAquot;); } 3. }
-
-
public class TestB extends TestA {
-
public void start() { System.out.println(quot;TestBquot;); }
-
public static void main(String[] args) {
-
((TestA)new TestB()).start(); 8. }
9. }
What is the result?
-
TestB
-
Compilation fails.
-
TestA
-
An exception is thrown at runtime.
-
Answer: A
Question No: 216 – (Topic 3)
Click the Exhibit button. Given:
-
try {
-
A a = new A();
-
a.method1();
-
} catch (Exception e) {
-
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.)
-
The code on line 5 of class A will execute.
-
The code on line 5 of class B will execute.
-
The application will crash.
-
The exception will be propagated back to line 27.
-
The code on line 29 will be executed.
Answer: D,E
Question No: 217 – (Topic 3)
Given:
-
package com.company.application; 2.
-
-
public class MainClass {
-
public static void main(String[] args) {} 5. }
And MainClass exists in the /apps/com/company/application directory. Assume the
CLASSPATH environment variable is set to quot;.quot; (current directory).
Which two java commands entered at the command line will run MainClass? (Choose two.)
-
java -classpath /apps/com/company/application:. MainClass if run from the /apps directory
-
java com.company.application.MainClass if run from the /apps directory
-
java -classpath . MainClass if run from the /apps/com/company/application directory
-
java MainClass if run from the /apps directory
-
java com.company.application.MainClass if run from the /apps/com/company/application directory
-
java -classpath /apps com.company.application.MainClass if run from any directory
-
Answer: B,F
Question No: 218 – (Topic 3)
Given:
-
static void test() throws RuntimeException {
-
try {
-
System.out.print(quot;test quot;);
-
throw new RuntimeException();
15. }
16. catch (Exception ex) { System.out.print(quot;exception quot;); }
17. }
-
public static void main(String[] args) {
-
try { test(); }
-
catch (RuntimeException ex) { System.out.print(quot;runtime quot;); }
-
System.out.print(quot;end quot;);
22. }
What is the result?
-
test runtime end
-
A Throwable is thrown by main at runtime.
-
test end
-
Compilation fails.
-
test exception end
Answer: E
Question No: 219 – (Topic 3)
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?
-
Compilation fails.
-
An exception is thrown at runtime.
-
The code executes normally and prints quot;fooquot;.
-
The code executes normally, but nothing is printed.
Answer: B
Question No: 220 – (Topic 3)
Given a valid DateFormat object named df, and
-
Date d = new Date(0L);
-
String ds = quot;December 15, 2004quot;;
-
// insert code here
What updates d#39;s value with the date represented by ds?
-
18. d = df.parse(ds);
-
18. try {
-
-
d = df.getDate(ds);
-
} catch(ParseException e) { };
-
18. try {
-
d = df.parse(ds);
-
} catch(ParseException e) { };
-
-
18. d = df.getDate(ds);
Answer: C
100% Ensurepass Free Download!
–Download Free Demo:1z0-853 Demo PDF
100% Ensurepass Free Guaranteed!
–1z0-853 DumpsEnsurePass 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 HOT CATEGORY!HOT EXAM!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