Want to know Ucertify 1z0 803 pdf Exam practice test features? Want to lear more about Oracle Java SE 7 Programmer I certification experience? Study Exact Oracle 1z0 803 pdf answers to Latest java se 7 programmer i 1z0 803 questions at Ucertify. Gat a success with an absolute guarantee to pass Oracle 1z0 803 practice test (Java SE 7 Programmer I) test on your first attempt.

Q49. View the exhibit: 

public class Student { 

public String name = ""; 

public int age = 0; 

public String major = "Undeclared"; 

public boolean fulltime = true;  

public void display() { 

System.out.println("Name: " + name + " Major: " + major); } 

public boolean isFullTime() { 

return fulltime; 

Given: 

Public class TestStudent { 

public static void main(String[] args) { 

Student bob = new Student (); 

bob.name = "Bob"; 

bob.age = 18; 

bob.year = 1982; 

What is the result? 

A. year is set to 1982. 

B. bob.year is set to 1982 

C. A runtime error is generated. 

D. A compile time error is generated. 

Answer:


Q50. Given: 

What is the result? 

A. box 

B. nbo 

C. bo 

D. nb 

E. An exception is thrown at runtime 

Answer:


Q51. Given: 

Which approach ensures that the class can be compiled and run? 

A. Put the throw new Exception() statement in the try block of try – catch 

B. Put the doSomethingElse() method in the try block of a try – catch 

C. Put the doSomething() method in the try block of a try – catch 

D. Put the doSomething() method and the doSomethingElse() method in the try block of a try – catch 

Answer:


Q52. 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:


Q53. Given: 

What is the result? 

A. 2 4 6 8 10 12 

B. 2 4 6 8 10 12 14 

C. Compilation fails 

D. The program prints multiple of 2 infinite times 

E. The program prints nothing 

Answer:


Q54. 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; 

Answer: ABC 


Q55. Given the code fragment: 

Which code fragment prints blue, cyan, ? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:


Q56. 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: AB 


Q57. Given: 

What is the result? 

A. Null 

B. Compilation fails 

C. An exception is thrown at runtime 

D. 0 

Answer:


Q58. Given: 

What is the result? 

A. true true 

B. true false 

C. false true 

D. false false 

E. Compilation fails 

Answer:


Q59. Identify two benefits of using ArrayList over array in software development. 

A. reduces memory footprint 

B. implements the Collection API 

C. is multi.thread safe 

D. dynamically resizes based on the number of elements in the list 

Answer: AD 


Q60. 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:


Q61. Given: 

class X {} 

class Y { Y ( ) { } } 

class Z { Z (int i ) { } } 

Which class has a default constructor? 

A. X only 

B. Y only 

C. Z only 

D. X and Y 

E. Y and Z 

F. X and Z 

G. X, Y and Z 

Answer:


Q62. Given a java source file: 

What changes will make this code compile? (Select Two) 

A. Adding the public modifier to the declaration of class x 

B. Adding the protected modifier to the x() constructor 

C. Changing the private modifier on the declaration of the one() method to protected 

D. Removing the Y () constructor 

E. Removing the private modifier from the two () method 

Answer: CE 


Q63. 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:


Q64. public class Two { 

public static void main(String[] args) { 

try { 

doStuff(); 

system.out.println("1"); 

catch { 

system.out.println("2"); 

}} 

public static void do Stuff() { 

if (Math.random() > 0.5) throw new RunTimeException(); doMoreStuff(); 

System.out.println("3 "); 

public static void doMoreStuff() { 

System.out.println("4"); 

Which two are possible outputs? 

A. 2 

B. 4 3 1 

C. 1 

D. 1 2 

Answer: AB