Download Oracle.1Z0-803.PracticeDumps.2017-12-08.216q.vcex

Download Exam

File Info

Exam Java SE 7 Programmer I
Number 1Z0-803
File Name Oracle.1Z0-803.PracticeDumps.2017-12-08.216q.vcex
Size 11 MB
Posted Dec 08, 2017
Download Oracle.1Z0-803.PracticeDumps.2017-12-08.216q.vcex

How to open VCEX & EXAM Files?

Files with VCEX & EXAM extensions can be opened by ProfExam Simulator.

Purchase

Coupon: MASTEREXAM
With discount: 20%



Exam Hub discount


Demo Questions

Question 1

Given the code fragment:
   
What is the result?


  1. 3 false 1
  2. 2 true 3
  3. 2 false 3
  4. 3 true 1
  5. 3 false 3
  6. 2 true 1
  7. 2 false 1
Correct answer: D
Explanation:
The length of the element with index 0, {0, 1, 2}, is 3. Output: 3The element with index 1, {3, 4, 5, 6}, is of type array. Output: trueThe element with index 0, {0, 1, 2} has the element with index 1: 1. Output: 1
The length of the element with index 0, {0, 1, 2}, is 3. Output: 3
The element with index 1, {3, 4, 5, 6}, is of type array. Output: true
The element with index 0, {0, 1, 2} has the element with index 1: 1. Output: 1



Question 2

View the exhibit:
   
Given:
   
What is the result when this program is executed?


  1. Bob's Name: Bob
  2. Bob's Name: Jian
  3. Nothing prints
  4. Bob’s name
Correct answer: B
Explanation:
After the statement jian = bob; the jian will reference the same object as bob.
After the statement jian = bob; the jian will reference the same object as bob.



Question 3

Given the code fragment:
   
 
What is the result?


  1. Valid
  2. Not valid
  3. Compilation fails
  4. An IllegalArgumentException is thrown at run time
Correct answer: C
Explanation:
In segment 'if (valid)' valid must be of type boolean, but it is a string. This makes the compilation fail.
In segment 'if (valid)' valid must be of type boolean, but it is a string. 
This makes the compilation fail.



Question 4

Given:
   
 
What is the result?


  1. 4
  2. 4
  3. 6
  4. 5
Correct answer: A
Explanation:
Within main z is assigned 6. z is printed. Output: 6Within doStuff z is assigned 5.DoStuff2 locally sets z to 4 (but MyScope.z is set to 4), but in Dostuff z is still 5. z is printed. Output: 5Again z is printed within main (with local z set to 6). Output: 6Finally MyScope.z is printed. MyScope.z has been set to 4 within doStuff2(). Output: 4
Within main z is assigned 6. z is printed. Output: 6
Within doStuff z is assigned 5.DoStuff2 locally sets z to 4 (but MyScope.z is set to 4), but in Dostuff z is still 5. z is printed. Output: 5
Again z is printed within main (with local z set to 6). Output: 6
Finally MyScope.z is printed. MyScope.z has been set to 4 within doStuff2(). Output: 4



Question 5

Which two are valid instantiations and initializations of a multi dimensional array? 
   


  1. Option A
  2. Option B
  3. Option C
  4. Option D
  5. Option E
Correct answer: AD



Question 6

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


  1. The Exception must be caught
  2. The Exception must be declared to be thrown.
  3. The Exception must be caught or declared to be thrown.
  4. No other code needs to be added.
Correct answer: D
Explanation:
Because the Java programming language does not require methods to catch or to specify unchecked exceptions (RuntimeException, Error, and their subclasses), programmers may be tempted to write code that throws only unchecked exceptions or to make all their exception subclasses inherit from RuntimeException. Both of these shortcuts allow programmers to write code without bothering with compiler errors and without bothering to specify or to catch any exceptions. Although this may seem convenient to the programmer, it sidesteps the intent of the catch or specify requirement and can cause problems for others using your classes.
Because the Java programming language does not require methods to catch or to specify unchecked exceptions (RuntimeException, Error, and their subclasses), programmers may be tempted to write code that throws only unchecked exceptions or to make all their exception subclasses inherit from RuntimeException. Both of these shortcuts allow programmers to write code without bothering with compiler errors and without bothering to specify or to catch any exceptions. Although this may seem convenient to the programmer, it sidesteps the intent of the catch or specify requirement and can cause problems for others using your classes.



Question 7

Given the code fragment:
    
What is the result?


  1. 2
  2. 2
  3. 2
  4. 3
Correct answer: A
Explanation:
Variable b is set to 4. Variable b is decreased to 3. Variable b is decreased to 2 and then printed. Output: 2Variable b is printed. Output: 2
Variable b is set to 4. 
Variable b is decreased to 3. 
Variable b is decreased to 2 and then printed. Output: 2
Variable b is printed. Output: 2



Question 8

Given the code fragment:
interface SampleClosable { 
public void close () throws java.io.IOException; 
Which three implementations are valid? 
   


  1. Option A
  2. Option B
  3. Option C
  4. Option D
  5. Option E
Correct answer: ACE
Explanation:
A: Throwing the same exception is fine.C: Using a subclass of java.io.IOException (here java.io.FileNotFoundException) is fineE: Not using a throw clause is fine.Incorrect answers:B: Exception is not a subclass of java.io.IOException and cannot be used here.D: Not extends. SampleCloseable cannot be the superclass of Test, a superclass must be a class. (An interface extends other interfaces.)
A: Throwing the same exception is fine.
C: Using a subclass of java.io.IOException (here java.io.FileNotFoundException) is fine
E: Not using a throw clause is fine.
Incorrect answers:
B: Exception is not a subclass of java.io.IOException and cannot be used here.
D: Not extends. SampleCloseable cannot be the superclass of Test, a superclass must be a class. (An interface extends other interfaces.)



Question 9

Given the code fragment:
  
What is the result?


  1. Null
  2. Null 
    4
  3. An IllegalArgumentException is thrown at run time
  4. An ArrayIndexOutOfBoundException is thrown at run time
Correct answer: D
Explanation:
The first println statement, System.out.println(array [4][1]);, works fine. It selects the element/array with index 4, {0, 4, 8, 12, 16}, and from this array it selects the element with index 1, 4. Output: 4The second println statement, System.out.println(array) [1][4]);, fails. It selects the array/element with index 1, {0, 1}, and from this array it try to select the element with index 4. This causes an exception. Output:4 Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 4
The first println statement, System.out.println(array [4][1]);, works fine. It selects the element/array with index 4, {0, 4, 8, 12, 16}, and from this array it selects the element with index 1, 4. Output: 4
The second println statement, System.out.println(array) [1][4]);, fails. It selects the array/element with index 1, {0, 1}, and from this array it try to select the element with index 4. This causes an exception. 
Output:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 4



Question 10

Given:
    
How many times is 2 printed as a part of the output?


  1. Zero
  2. Once
  3. Twice
  4. Thrice
  5. Compilation fails.
Correct answer: A









CONNECT US

Facebook

Twitter

PROFEXAM WITH A 20% DISCOUNT

You can buy ProfExam with a 20% discount!



HOW TO OPEN VCEX FILES

Use ProfExam Simulator to open VCEX files