Our pass rate is high to 98.9% and the similarity percentage between our 1z0 808 practice test study guide and real exam is 90% based on our seven-year educating experience. Do you want achievements in the Oracle 1z0 808 java se 8 programmer i exam in just one try? I am currently studying for the Oracle 1z0 808 book exam. Latest Oracle exam 1z0 808 Test exam practice questions and answers, Try Oracle java se 8 programmer i 1z0 808 pdf Brain Dumps First.
Q131. Given:
public class Test {
public static void main(String[] args) {
try {
String[] arr =new String[4];
arr[1] = "Unix";
arr[2] = "Linux";
arr[3] = "Solarios";
for (String var : arr) {
System.out.print(var + " ");
}
} catch(Exception e) {
System.out.print (e.getClass());
}
}
}
What is the result?
A. Unix Linux Solaris
B. Null Unix Linux Solaris
C. Class java.lang.Exception
D. Class java.lang.NullPointerException
Answer: B
Explanation: null Unix Linux Solarios
The first element, arr[0], has not been defined.
Q132. Given the code fragment:
What is the result if the integer aVar is 9?
A. 10 Hello world!
B. 10 Hello universe!
C. 9 Hello world!
D. Compilation fails.
Answer: A
Q133. Which two are Java Exception classes?
A. SercurityException
B. DuplicatePathException
C. IllegalArgumentException
D. TooManyArgumentsException
Answer: A,C
Q134. Given the code fragment:
int b = 3;
if ( !(b > 3)) {
System.out.println("square ");
}{
System.out.println("circle ");
}
System.out.println("...");
What is the result?
A. square...
B. circle...
C. squarecircle...
D. Compilation fails.
Answer: C
Q135. Given:
public class ScopeTest {
int j, int k;
public static void main(String[] args) {
ew ScopeTest().doStuff(); }
void doStuff() {
nt x = 5;
oStuff2();
System.out.println("x");
}
void doStuff2() {
nt y = 7;
ystem.out.println("y");
or (int z = 0; z < 5; z++) {
ystem.out.println("z");
ystem.out.println("y");
}
Which two items are fields?
A. j
B. k
C. x
D. y
E. z
Answer: A,B
Q136. Given:
What is the result?
A. Base DerivedA
B. Base DerivedB
C. DerivedB DerivedB
D. DerivedB DerivedA
E. A classcast Except ion is thrown at runtime.
Answer: C
Q137. Given the code fragment:
What is the result?
A. Jesse 25 Walter 52
B. Compilation fails only at line n1
C. Compilation fails only at line n2
D. Compilation fails at both line n1 and line n2
Answer: D
Q138. Given: class Base {
public static void main(String[] args) {
System.out.println("Base " + args[2]);
}
}
public class Sub extends Base{
public static void main(String[] args) {
System.out.println("Overriden " + args[1]);
}
}
And the commands:
javac Sub.java
java Sub 10 20 30
What is the result?
A. Base 30
B. Overridden 20
C. Overridden 20 Base 30
D. Base 30 Overridden 20
Answer: B
Q139. 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
Answer: A,C
Q140. Given:
A. X XX
B. X Y X
C. Y Y X
D. Y YY
Answer: D