1Z0-803 | A Review Of Refined 1Z0-803 exam


Q51. Which three statements are benefits of encapsulation? 

A. Allows a class implementation to change without changing t he clients 

B. Protects confidential data from leaking out of the objects 

C. Prevents code from causing exceptions 

D. Enables the class implementation to protect its invariants 

E. Permits classes to be combined into the same package 

F. Enables multiple instances of the same class to be created safely 

Answer: ABD 

Q52. Given the code format: 

Which code fragment must be inserted at line 6 to enable the code to compile? 

A. DBConfiguration f; return f; 

B. Return DBConfiguration; 

C. Return new DBConfiguration; 

D. Retutn 0; 

Answer:

Q53. Given: 

What is the result? 

A. 11, 21, 31, 11, 21, 31 

B. 11, 21, 31, 12, 22, 32 

C. 12, 22, 32, 12, 22, 32 

D. 10, 20, 30, 10, 20, 30 

Answer:

Q54. What is the result? 

A. 3 false 1 

B. 2 true 3 

C. 2 false 3 

D. 3 true 1 

E. 3 false 3 

F. 2 true 1 

G. 2 false 1 

Answer:

Q55. Which is a valid abstract class? 

A. public abstract class Car { 

protected void accelerate(); 

B. public interface Car { 

protected abstract void accelerate(); 

C. public abstract class Car { 

protected final void accelerate(); 

D. public abstract class Car { 

protected abstract void accelerate(); 

E. public abstract class Car { 

protected abstract void accelerate() { 

//more car can do 

}} 

Answer:

Q56. Given the code fragment: 

What is the result? 

A. 28false29 true 

B. 285 < 429 true 

C. true true 

D. compilation fails 

Answer:

Q57. Given the code fragment: 

String h1 = "Bob"; 

String h2 = new String ("Bob"); 

What is the best way to test that the values of h1 and h2 are the same? 

A. if (h1 = = h2) 

B. if (h1.equals(h2)) 

C. if (h1 = = h2) 

D. if (h1.same(h2)) 

Answer:

Q58. What is the result? 

A. Initialized 

Started 

B. Initialized 

Started 

Initialized 

C. Compilation fails 

D. An exception is thrown at runtime 

Answer:

Q59. Which two packages are automatically imported into the java source file by the java compiler? 

A. Java.lang 

B. Java.awt 

C. Java.util 

D. Javax.net 

E. Java.* 

F. The package with no name 

Answer: AF 

Q60. Given the code fragment: 

int [][] array2d = new int[2][3]; 

System.out.println("Loading the data."); 

for ( int x = 0; x < array2d.length; x++) { 

for ( int y = 0; y < array2d[0].length; y++) { 

System.out.println(" x = " + x); 

System.out.println(" y = " + y); 

// insert load statement here. 

System.out.println("Modify the data. "); 

for ( int x = 0; x < array2d.length; x++) { 

for ( int y = 0; y < array2d[0].length; y++) { 

System.out.println(" x = " + x); 

System.out.println(" y = " + y); 

// insert modify statement here. 

Which pair of load and modify statement should be inserted in the code? The load 

statement should set the array's x row and y column value to the sum of x and y 

The modify statement should modify the array's x row and y column value by multiplying it by 2 

A. Load statement: array2d(x,y) = x + y; 

Modify statement: array2d(x,y) = array2d(x,y) * 2 

B. Load statement: array2d[x y] = x + y; 

Modify statement: array2d[x y] = array2d[x y] * 2 

C. Load statement: array2d[x,y] = x + y; 

Modify statement: array2d[x,y] = array2d[x,y] * 2 

Oracle 1z0-803 : Practice Test 

D. Load statement: array2d[x][y] = x + y; 

Modify statement: array2d[x][y] = array2d[x][y] * 2 

E. Load statement: array2d[[x][y]] = x + y; 

Modify statement: array2d[[x][y]] = array2d[[x][y]] * 2 

Answer: