1z0-803 Actual Exam Questions

Last updated on Nov. 30, 2024.
Vendor:Oracle
Exam Code:1z0-803
Exam Name:Java SE 7 Programmer I
Exam Questions:216
 

Topic 1 - Single Topic

Question #1 Topic 1

Given the code fragment:

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
Reveal Solution Hide Solution   Discussion  

Correct Answer: D 🗳️
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 Topic 1

View the exhibit:

Given:

What is the result when this program is executed?

  • A. Bob's Name: Bob
  • B. Bob's Name: Jian
  • C. Nothing prints
  • D. Bob’s name
Reveal Solution Hide Solution   Discussion  

Correct Answer: B 🗳️
After the statement jian = bob; the jian will reference the same object as bob.

Question #3 Topic 1

Given the code fragment:

What is the result?

  • A. Valid
  • B. Not valid
  • C. Compilation fails
  • D. An IllegalArgumentException is thrown at run time
Reveal Solution Hide Solution   Discussion  

Correct Answer: C 🗳️
In segment 'if (valid)' valid must be of type boolean, but it is a string.
This makes the compilation fail.

Question #4 Topic 1

Given:

What is the result?

  • A. 6
  • B. 6
  • C. 6
  • D. 6
Reveal Solution Hide Solution   Discussion   2

Correct Answer: A 🗳️
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 Topic 1

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

  • A. Option A
  • B. Option B
  • C. Option C
  • D. Option D
  • E. Option E
Reveal Solution Hide Solution   Discussion  

Correct Answer: AD 🗳️

file Viewing page 1 out of 44 pages.
Viewing questions 1-5 out of 216 questions
Next Questions
Browse atleast 50% to increase passing rate cup
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago