Get Full Version of the Exam
http://www.EnsurePass.com/1z0-808.html
Question No.41
Given:
What is the result?
-
Option A
-
Option B
-
Option C
-
Option D
Correct Answer: B
Question No.42
Given the code fragments:
Which modification enables the code to compile?
-
Replace line n1 with:import p1.A;Replace line n2 with:import p1.A;import p1.p2.B;
-
Replace line n1 with:import p1;Replace line n2 with:import p1;import p1.p2;
-
Replace line n1 with:import p1.A;Replace line n2 with:import p1.*;
-
Replace line n1 with:import p1.*;Replace line n2 with:import p1.p2.*;
Correct Answer: D
Question No.43
Which code fragment causes a compilation error?
-
Option A
-
Option B
-
Option C
-
Option D
-
Option E
Correct Answer: D
Question No.44
Given the code fragment:
Which three code fragments are valid at line n1?
-
public static void insertToy() {/* code goes here */}
-
public abstract Toy getToy() {return new Toy();}
-
public void printToy();
-
public int calculatePrice() {return price;}
-
public abstract int computeDiscount();
Correct Answer: CDE
Question No.45
Given:
What is the result?
-
c=b = falsef = 0.0
-
c= nullb = truef = 0.0
-
c=0b = falsef = 0.0f
-
c= nullb = falsef = 0.0F
Correct Answer: C
Question No.46
Given:
What is the result?
-
True false
-
True null
-
Compilation fails
-
A NullPointerException is thrown at runtime
Correct Answer: A
Question No.47
Given:
What is the result?
-
BaseDerivedA
-
BaseDerivedB
-
DerivedBDerivedB
-
DerivedBDerivedA
-
A classcast Exception is thrown at runtime.
Correct Answer: C
Question No.48
Which three are advantages of the Java exception mechanism?
-
Improves the program structure because the error handling code is separated from the normal program function
-
Provides a set of standard exceptions that covers all the possible errors
-
Improves the program structure because the programmer can choose where to handle exceptions
-
Improves the program structure because exceptions must be handled in the method in which they occurred
-
Allows the creation of new exceptions that are tailored to the particular program being created
Correct Answer: ACD
Question No.49
Which statement will empty the contents of a StringBuilder variable named sb?
-
sb. deleteAll ();
-
sb. delete (0, sb. size () );
-
sb. delete (0, sb. length () );
-
sb. removeAll ();
Correct Answer: C
Question No.50
Given:
What is the result?
-
Option A
-
Option B
-
Option C
-
Option D
Correct Answer: B
Get Full Version of the Exam
1z0-808 Dumps
1z0-808 VCE and PDF