 # PassLeader Valid 1Z0-808 Dumps with VCE and PDF (Question 9 – Question 16)

A.    Option A
B.    Option B
C.    Option C
D.    Option D

Explanation:
After ref1 is instantiated, ref1.ns = 50 and s = 50
After ref2 is instantiated, ref2.ns = 125 and s = 125
After ref3 is instantiated, ref3.ns = 0 and s = 125

QUESTION 10
Given the code fragment: What is the result?

A.    2 4
B.    0 2 4 6
C.    0 2 4
D.    Compilation fails

QUESTION 11
Given the code fragment: Assume that the system date is June 20, 2014. What is the result? A.    Option A
B.    Option B
C.    Option C
D.    Option D

QUESTION 12
Given the code fragment: Which code fragment, when inserted at line 9, enables the code to print true?

A.    String str2 = str1;
B.    String str2 = new String (str1);
C.    String str2 = sb1. toString ();
D.    String str2 = “Duke”;

Explanation:
Operator == checks if two things are EXACTLY the same thing, not if they have the same content

QUESTION 13
Given the code fragment: What is the result?

A.    10 : 10
B.    5 : 5
C.    5 : 10
D.    Compilation fails

Explanation:
The variable i is local to all instances of class Test so each time we create an instance, i=0 and the loop add 5 to count.
The variable count (static) is global to all instances of class Test and all instances share the same variable. It’s been initialized only once to zero an retains its value between the calls to changeCount.
Since we call two times the method changeCount, the final result is 10 : 10.

QUESTION 14
Given the code fragment: And given the requirements:
– If the value of the qty variable is greater than or equal to 90, discount = 0.5
– If the value of the qty variable is between 80 and 90, discount = 0.2
Which two code fragments can be independently placed at line n1 to meet the requirements? A.    Option A
B.    Option B
C.    Option C
D.    Option D
E.    Option E

QUESTION 15
Given: And given the commands:
javac Test.Java
Java Test Hello
What is the result?

A.    Success
B.    Failure
C.    Compilation fails.
D.    An exception is thrown at runtime

QUESTION 16
Which three statements describe the object-oriented features of the Java language?

A.    Objects cannot be reused.
B.    A subclass can inherit from a superclass.
C.    Objects can share behaviors with other objects.
D.    A package must contain more than one class.
E.    Object is the root class of all other objects.
F.    A main method must be declared in every class.