Oracle
1Z0-803 · Question #52
1Z0-803 Question #52: Real Exam Question with Answer & Explanation
The correct answer is E: Change line 5 to the following:. price.price =4; is correct, not price=4; The attribute price of the instance must be set, not the instance itself.
Question
Given the following code: What will make this code compile and run?
Exhibit
Options
- AChange line 2 to the following:
- BChange line 4 to the following:
- CChange line 4 to the following:
- DChange line 5 to the following:
- EChange line 5 to the following:
- FChange line 5 to the following:
- GChange line 5 to the following:
- HThe code compiles and runs properly; no changes are necessary
Explanation
price.price =4; is correct, not price=4; The attribute price of the instance must be set, not the instance itself.
Community Discussion
No community discussion yet for this question.
