Oracle 1Z0-803
Get real exam questions for 1Z0-803 Java SE 7 Programmer I. 100% Free.
1Z0-803 Premium VCE File
Learn More
100% Pass Guarantee - Dumps Verified - Instant Download
150 Lectures, 20 Hours
Q1. Given: Which two modifications are necessary to ensure that the class is being properly encapsulated? The class is poorly encapsulated. You need to change the circle class to compute and return the area instead. A. Remove the area field. B. Change the getArea( ) method as follows: public double getArea ( ) { return Match.PI * radius * radius; } C. Add the following method: public double
Q1. Given: Which code fragment, when inserted at line 7, enables the code print true? A. Option A B. Option B C. Option C D. Option D View AnswerAnswer: A Q2. class Overloading { int x(double d) { System.out.println("one"); return 0; } String x(double d) { System.out.println("two"); return null; } double x(double d) { System.out.println("three"); return 0.0; } public static
Q1. public class StringReplace { public static void main(String[] args) { String message = "Hi everyone!"; System.out.println("message = " + message.replace("e", "X")); } } What is the result? A. message = Hi everyone! B. message = Hi XvXryonX! C. A compile time error is produced. D. A runtime error is produced. E. message = F. message = Hi Xveryone! View AnswerAnswer: B Q2. Why wi
Q1. Given: What is the result? A. Compilation fails B. An exception is thrown at runtime C. There is no result because this is not correct way to determine the hash code D. Hash is: 111111, 44444444, 999999999 View AnswerAnswer: A Q2. Given: What is the result? A. One B. Two C. Three D. Compilation fails View AnswerAnswer: C Q3. Given: What code should be inserted? A. Option A
Q1. Given: What is the result? A. 1 1 1 B. 1 2 3 C. 2 3 4 D. Compilation fails E. The loop executes infinite times View AnswerAnswer: D Q2. 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. View AnswerAnswer: C Q3. Given: What is the result? A. x: 1 y: 2 B. 3 y: 4 C. x: 0 y: 0 D. 3 y: 4 E. x: 1 y:
Q1. public class ForTest { public static void main(String[] args) { int[] arrar = {1,2,3}; for ( foo ) { } } } Which three are valid replacements for foo so that the program will compiled and run? A. int i: array B. int i = 0; i < 1; i++ C. ;; D. ; i < 1; i++ E. ; i < 1; View AnswerAnswer: ABC Q2. Given: public class ScopeTest { int j, int k; public static void main(St
Q1. Given the code fragment: How many times is 2 printed? A. Zero B. Once C. Twice D. Thrice E. It is not printed because compilation fails View AnswerAnswer: B Q2. Given: How many objects have been created when the line / / do complex stuff is reached? A. Two B. Three C. Four D. Six View AnswerAnswer: C Q3. Given: What is the result? A. 10 : 22 : 20 B. 10 : 22 : 22 C. 10 :
Q1. Given the code fragment: What is the result? A. 10 8 6 4 2 0 B. 10 8 6 4 2 C. An Arithmetic Exception is thrown at runtime D. The program goes into an infinite loop outputting: 10 8 6 4 2 0. . . E. Compilation fails View AnswerAnswer: B Q2. boolean log3 = ( 5.0 != 6.0) && ( 4 != 5); boolean log4 = (4 != 4) || (4 == 4); System.out.println("log3:"+ log3 + \nlog4" + log4); W
Q1. 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 View
Q1. What is the result? A. Valid B. Not valid C. Compilation fails D. An IllegalArgumentException is thrown at run time View AnswerAnswer: C Q2. Given: Javac Jump.java Java Jump crazy elephant is always What is the result? A. Lazy lion is jumping B. Lion is always jumping C. Crazy elephant is jumping D. Elephant is always jumping E. Compilation fails View AnswerAnswer: B Q3. G
Q1. Given the code fragment: What is the result? A. 2 2 B. 1 2 C. 3 2 D. 3 3 View AnswerAnswer: A Q2. Given: Given the code fragment: What is the result? A. 10 20 30 40 B. 0 0 30 40 C. Compilation fails D. An exception is thrown at runtime View AnswerAnswer: A Q3. Given the code fragment: nt a = 0; a++; System.out.printIn(a++); System.out.printIn(a); What is the result? A