♥♥ 2017 NEW RECOMMEND ♥♥

Free VCE & PDF File for Oracle 1Z0-803 Real Exam (Full Version!)

★ Pass on Your First TRY ★ 100% Money Back Guarantee ★ Realistic Practice Exam Questions

Free Instant Download NEW 1Z0-803 Exam Dumps (PDF & VCE):
Available on: http://www.surepassexam.com/1Z0-803-exam-dumps.html

Q1. Which code fragment, when inserted at line 9, enables the code to print true? 

A. String str2 = str1; 

B. String str2 = new string (str1); 

C. String str2 = sb1.toString(); 

D. String str2 = “Duke”; 

Answer:


Q2. Given: 

Which code fragment, when inserted at line 14, enables the code to print Mike Found? 

A. int f = ps.indexOf {new patient (“Mike”)}; 

B. int f = ps.indexOf (patient(“Mike”)); 

C. patient p = new Patient (“Mike”); 

int f = pas.indexOf(P) 

D. int f = ps.indexOf(p2); 

Answer:


Q3. Given: 

What is the result? 

A. 2 1 

B. 2 1 0 

C. null 

D. an infinite loop 

E. compilation fails 

Answer:


Q4. Given a code fragment: 

 

A. They match They real match 

B. They really match 

C. They match 

D. Nothing is printed to the screen 

Answer:


Q5. Which two statements are true for a two-dimensional array? 

A. It is implemented as an array of the specified element type. 

B. Using a row by column convention, each row of a two-dimensional array must be of the same size. 

C. At 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: AD 


Q6. Given the code fragment: 

Boolean b1 = true; 

Boolean b2 = false; 

int i = 0; 

while (foo) { } 

Which one is valid as a replacement for foo? 

A. b1.compareTo(b2) 

B. i = 1 

C. i == 2? -1 : 0 

D. "foo".equals("bar") 

Answer:


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


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


Q9. Given the class definitions: 

And the code fragment of the main() method, 

What is the result? 

A. Java 

Java 

Java 

B. Java 

Jeve 

va 

C. Java 

Jeve 

ve 

D. Compilation fails 

Answer:


Q10. ArrayList<Integer> list = new ArrayList<>(1); 

2. list.add(1001); 

3. list.add(1002); 

4. System.out.println(list.get(list.size())); 

What is the result? 

A. Compilation fails due to an error on line 1. 

B. An exception is thrown at run time due to error on line 3 

C. An exception is thrown at run time due to error on line 4 

D. 1002 

Answer: