Proper study guides for Avant-garde Oracle Java SE 7 Programmer I certified begins with Oracle 1z0 803 practice test preparation products which designed to deliver the Tested java se 7 programmer i 1z0 803 questions by making you pass the 1z0 803 practice test test at your first time. Try the free 1z0 803 dumps demo right now.

Q31. Given: 

And the commands: 

Javac Test.java 

Java Test 12345 

What is the result? 

A. Number us : 12345 

B. A NullPointerException is thrown at runtime 

C. A NumberFormatException is thrown at runtime 

D. AnArrayIndexOutOfBoundException is thrown at runtime. 

Answer:


Q32. Given: 

What is the result? 

A. There is no output 

B. d is output 

C. A StringIndexOutOfBoundsException is thrown at runtime 

D. An ArrayIndexOutOfBoundsException is thrown at runtime 

E. A NullPointException is thrown at runtime 

F. A StringArrayIndexOutOfBoundsException is thrown at runtime 

Answer:


Q33. 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 

Answer:


Q34. Given: 

What is the reference type of myZ and what is the type of the object it references? 

A. Reference type is Z; object type is Z. 

B. Reference type is Y; object type is Y. 

C. Reference type is Z; object type is Y. 

D. Reference type is X; object type is Z. 

Answer:


Q35. 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 


Q36. Which statement initializes a stringBuilder to a capacity of 128? 

A. StringBuilder sb = new String ("128"); 

B. StringBuilder sb = StringBuilder.setCapacity (128); 

C. StringBuilder sb = StringBuilder.getInstance (128); 

D. StringBuilder sb = new StringBuilder (128); 

Answer:


Q37. Given: 

public class Main { 

public static void main(String[] args) { 

try { 

doSomething(); 

catch (SpecialException e) { 

System.out.println(e); 

}} 

static void doSomething() { 

int [] ages = new int[4]; 

ages[4] = 17; 

doSomethingElse(); 

static void doSomethingElse() { 

throw new SpecialException("Thrown at end of doSomething() method"); } 

What is the output? 

A. SpecialException: Thrown at end of doSomething() method 

B. Error in thread "main" java.lang. 

ArrayIndexOutOfBoundseror 

C. Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 4 

at Main.doSomething(Main.java:12) 

at Main.main(Main.java:4) 

D. SpecialException: Thrown at end of doSomething() method at 

Main.doSomethingElse(Main.java:16) 

at Main.doSomething(Main.java:13) 

at Main.main(Main.java:4) 

Answer:


Q38. Which two items can legally be contained within a java class declaration? 

A. An import statement 

B. A field declaration 

C. A package declaration 

D. A method declaration 

Answer: BD 


Q39. Given: 

What is the result? 

A. null 

B. compilation fails 

C. Java.lang.NullPointerException 

D. 0 

Answer:


Q40. given: 

A. ns = 50 S = 125 

ns = 125 S = 125 

ns = 100 S = 125 

B. ns = 50 S = 125 

ns = 125 S = 125 

ns = 0 S = 125 

C. ns = 50 S = 50 

ns = 125 S = 125 

ns = 100 S = 100 

D. ns = 50 S = 50 

ns = 125 S = 125 

ns = 0 S = 125 

Answer: