How to win with 1z0 803 practice test
Exam Code: 1z0 803 practice test (Practice Exam Latest Test Questions VCE PDF)
Exam Name: Java SE 7 Programmer I
Certification Provider: Oracle
Free Today! Guaranteed Training- Pass 1z0 803 dumps Exam.
Q11. Given:
What is the result?
A. One
B. Two
C. Three
D. Compilation fails
Answer: C
Q12. Given the code fragment:
interface SampleClosable {
public void close () throws java.io.IOException;
}
Which three implementations are valid?
A. Option A
B. Option B
C. Option C
D. Option D
E. Option E
Answer: ACE
Q13. 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: C
Q14. Which code fragment cause a compilation error?
A. flat flt = 100F;
B. float flt = (float) 1_11.00;
C. float flt = 100;
D. double y1 = 203.22; floatflt = y1
E. int y2 = 100; floatflt = (float) y2;
Answer: B
Q15. Given:
public class MainMethod {
void main() {
System.out.println("one");
}
static void main(String args) {
System.out.println("two");
}
public static void main(String[] args) {
System.out.println("three");
}
void mina(Object[] args) {
System.out.println("four");
}
}
What is printed out when the program is excuted?
A. one
B. two
C. three
D. four
Answer: C
Q16. Given:
Which three lines will compile and output “right on!”?
A. Line 5
B. Line 6
C. Line 7
D. Line 8
E. Line 9
F. Line 10
Answer: CDF
Q17. Given the code fragment:
What values of x, y, z will produce the following result?
1 2 3 4
1 2 3 4
1 2 3 4
1 2 3 4
A. X = 4, Y = 3, Z = 2
B. X = 3, Y = 2, Z = 3
C. X = 2, Y = 3, Z = 3
D. X = 4, Y = 2, Z = 3
E. X = 2, Y = 3, Z = 4
Answer: E
Q18. Given the class definitions:
And the code fragment of the main() method,
What is the result?
A. Java
Java
Java
B. Java
Jeve
va
C. Java
Jeve
ve
D. Compilation fails
Answer: D
Q19. What is the result?
A. Hello
B. Default
C. Compilation fails
D. The program prints nothing
E. An exception is thrown at run time
Answer: A
Q20. Class StaticField {
static int i = 7;
public static void main(String[] args) {
StaticFied obj = new StaticField();
obj.i++;
StaticField.i++;
obj.i++;
System.out.println(StaticField.i + " "+ obj.i);
}
}
What is the result?
A. 10 10
B. 8 9
C. 9 8
D. 7 10
Answer: A