exam questions

Exam 1z0-803 All Questions

View all questions & answers for the 1z0-803 exam

Exam 1z0-803 topic 1 question 208 discussion

Actual exam question from Oracle's 1z0-803
Question #: 208
Topic #: 1
[All 1z0-803 Questions]

Given the code fragment:

Which code fragment, when inserted at line // insert code here, enables class Test to print 123 : Fred : [Java, C]?

  • A. private Student(int i, String name, List cs) { /* initialization code goes here */ }
  • B. public void Student(int i, String name, List cs) { /* initialization code goes here */ }
  • C. Student(int i, String name, List cs) { /* initialization code goes here */ }
  • D. Student(int i, String name, ArrayList cs) { /* initialization code goes here */
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️
Incorrect:
Not A: Student has private access line: Student s = new Student(123,"Fred", cs);
Not D: Cannot be applied to given types. Line: Student s = new Student(123,"Fred", cs);

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Currently there are no comments in this discussion, be the first to comment!
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.

SaveCancel
Loading ...