nerdexam
Oracle

1Z0-851 · Question #193

1Z0-851 Question #193: Real Exam Question with Answer & Explanation

Sign in or unlock 1Z0-851 to reveal the answer and full explanation for question #193. The question stem and answer options stay visible for context.

Question

Click the Exhibit button. What two must the programmer do to correct the compilation errors? (Choose two.) 1. public class Car { 2. private int wheelCount; 3. private String vin; 4. public Car(String vin){ 5. this.vin = vin; 6. this.wheelCount = 4; 7. } 8. public String drive(){ 9. return "zoom-zoom"; 10. } 11. public String getInfo() { 12. return "VIN: " + vin + " wheels: " + wheelCount; 13. } 14.} And 1. public class MeGo extends Car { 2. public MeGo(String vin) { 3. this.wheelCount = 3; 4. } 5. }

Options

  • Ainsert a call to this() in the Car constructor
  • Binsert a call to this() in the MeGo constructor
  • Cinsert a call to super() in the MeGo constructor
  • Dinsert a call to super(vin) in the MeGo constructor
  • Echange the wheelCount variable in Car to protected
  • Fchange line 3 in the MeGo class to super.wheelCount = 3;

Unlock 1Z0-851 to see the answer

You've previewed enough free 1Z0-851 questions. Unlock 1Z0-851 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Full 1Z0-851 Practice