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: 121 – (Topic 2)
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
-
java -ea test file1
-
java -ea:test test file1
-
java test
-
java -ea test file1 file2
-
java test file1
Answer: A,E
Question No: 122 DRAG DROP – (Topic 2)
Click the Task button.
Answer:
Question No: 123 – (Topic 2)
A programmer must create a generic class MinMax and the type parameter of MinMax must implement Comparable. Which implementation of MinMax will compile?
-
class MinMaxlt;E implements Comparablelt;Egt;gt; {
lt;Egt; E min = null;
lt;Egt; E max = null; public MinMax() {}
public lt;Egt; void put(E value) { /* store min or max */ }
-
class MinMaxlt;E implements Comparablelt;Egt;gt; { E min = null;
E max = null; public MinMax() {}
public void put(E value) { /* store min or max */ }
-
class MinMaxlt;E extends Comparablelt;Egt;gt; {
lt;Egt; E min = null;
lt;Egt; E max = null; public MinMax() {}
public lt;Egt; void put(E value) { /* store min or max */ }
-
class MinMaxlt;E extends Comparablelt;Egt;gt; { E min = null;
E max = null; public MinMax() {}
public void put(E value) { /* store min or max */ }
Answer: D
Question No: 124 – (Topic 2)
Click the Exhibit button. What is the result?
A. Compilation fails because of an error in line 18.
B. 0000
C. 4321
-
An exception is thrown at runtime.
Answer: A
Question No: 125 – (Topic 2)
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
-
An exception is thrown at runtime.
-
TestA
-
Compilation fails.
Answer: A
Question No: 126 – (Topic 2)
Given:
-
public class Base {
-
public static final String FOO = quot;fooquot;;
-
public static void main(String[] args) {
-
Base b = new Base();
-
Sub s = new Sub();
-
System.out.print(Base.FOO);
-
System.out.print(Sub.FOO);
-
System.out.print(b.FOO);
-
System.out.print(s.FOO);
-
System.out.print(((Base)s).FOO); 11. } }
-
-
12. class Sub extends Base {public static final String FOO=quot;barquot;;} What is the result?
-
foofoofoobarbar
-
foofoofoobarfoo
-
foobarfoofoofoo
-
barbarbarbarbar
-
foobarfoobarfoo
-
foofoofoofoofoo
-
foobarfoobarbar
Answer: E
Question No: 127 DRAG DROP – (Topic 2)
Click the Task button.
Answer:
Question No: 128 – (Topic 2)
Click the Exhibit button. Given:
-
public void method() {
-
A a = new A();
-
a.method1();
34. }
Which statement is true if a TestException is thrown on line 3 of class B?
-
The method declared on line 31 must be declared to throw a RuntimeException.
-
Line 33 must be called within a try block.
-
The exception thrown by method1 in class A is not required to be caught.
-
On line 5 of class A, the call to method2 of class B does not need to be placed in a try/catch block.
Answer: C
Question No: 129 – (Topic 2)
Given
-
class Foo {
-
static void alpha() { /* more code here */ }
-
void beta() { /* more code here */ }
13. }
Which two statements are true? (Choose two.)
-
Foo.beta() is a valid invocation of beta().
-
Method alpha() can directly call method beta().
-
Method beta() can directly call method alpha().
-
Foo.alpha() is a valid invocation of alpha().
Answer: C,D
Question No: 130 – (Topic 2)
Given:
-
String #name = quot;Jane Doequot;;
-
int $age = 24;
-
Double _height = 123.5;
-
double ~temp = 37.5;
Which two statements are true? (Choose two.)
-
Line 35 will not compile.
-
Line 38 will not compile.
-
Line 37 will not compile.
-
Line 36 will not compile.
Answer: A,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