exam questions

Exam 1z0-819 All Questions

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

Exam 1z0-819 topic 1 question 104 discussion

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

Given:


Automobile.java -




Car.java -



What must you do so that the code prints 4?

  • A. Remove the parameter from wheels method in line 3.
  • B. Remove abstract keyword in line 1.
  • C. Replace the code in line 2 with Car ob = new Car();.
  • D. Add @Override annotation at line 2.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

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
ASPushkin
2 months, 1 week ago
Selected Answer: A
reference type is Automobile object type is Car Car object method is executed to show the polymorphism and methods must be virtual (overriden).
upvoted 1 times
...
d7bb0b2
1 year ago
A is correct: 1- abstract method need a impletation 2- the method that call when is override is by real type of object not declared type (abstract class). So if you remove is override method so when call is print 4
upvoted 1 times
...
Omnisumem
1 year, 2 months ago
Selected Answer: A
Tested: A.
upvoted 1 times
...
Stavok
1 year, 5 months ago
Selected Answer: A
A is correct TESTED
upvoted 1 times
...
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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago