1Z0-803 Exam - Java SE 7 Programmer I

certleader.com

Q1. Given: 

What is the result? 

A. hEllOjAvA! 

B. Hello java! 

C. Out of limits hEllOjAvA! 

D. Out of limits 

Answer:

Q2. Given the code fragment: 

What is the result? 

A. Found Red 

B. Found Red 

Found Blue 

C. Found Red 

Found Blue 

Found White 

D. Found Red 

Found Blue 

Found White 

Found Default 

Answer:

Q3. racle 1z0-803 : Practice Test 

j = (3 * ((2+4) + 5)); 

System.out.println("i:"+ i + "\nj":+j); 

What is the result? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:

Q4. Given the code fragment:

A. Values are : [EE, ME] 

B. Values are : [EE, EE, ME] 

C. Values are : [EE, ME, EE] 

D. Values are : [SE, EE, ME, EE] 

E. Values are : [EE, ME, SE, EE] 

Answer:

Q5. Given the fragment: 

A. 14 

B. 15 

C. 24 

D. 25 

E. 34 

F. 35 

Answer:

Q6. Which two statements are true for a two-dimensional array of primitive data type? 

A. It cannot contain elements of different types. 

B. The length of each dimension must be the same. 

C. At the declaration time, the number of elements of the array in each dimension must be 

specified. 

D. All methods of the class object may be invoked on the two-dimensional array. 

Answer: CD 

Q7. Given: 

A. Good Day! 

Good Luck! 

B. Good Day! 

Good Day! 

C. Good Luck! 

Good Day! 

D. Good Luck! 

Good Luck! 

E. Compilation fails 

Answer:

Q8. An unchecked exception occurs in a method dosomething() Should other code be added in the dosomething() method for it to compile and execute? 

A. The Exception must be caught 

B. The Exception must be declared to be thrown. 

C. The Exception must be caught or declared to be thrown. 

D. No other code needs to be added. 

Answer:

Q9. Given: 

What is true about the class Wow? 

A. It compiles without error. 

B. It does not compile because an abstract class cannot have private methods. 

C. It does not compile because an abstract class cannot have instance variables. 

D. It does not compile because an abstract class must have at least one abstract method. 

E. It does not compile because an abstract class must have a constructor with no arguments. 

Answer:

Q10. Given the following code: 

What will make this code compile and run? 

A. Change line 2 to the following: 

Public int price 

B. Change line 4 to the following: 

int price = new simple (); 

C. Change line 4 to the following: 

Float price = new simple (); 

D. Change line 5 to the following: 

Price = 4f; 

E. Change line 5 to the following: 

price.price = 4; 

F. Change line 5 to the following: 

Price = (float) 4: 

G. Change line 5 to the following: 

Price = (Simple) 4; 

H. The code compiles and runs properly; no changes are necessary 

Answer: