+ 2

I'm getting this error. Help! how to fix it?

Labrador.java:29: error: constructor Dog in class Dog cannot be applied to given types; { ^ required: String found: no arguments reason: actual and formal argument lists differ in length This is my code: public class Labrador extends Dog { public String Color; public int breedWeight = 50; // Setter methods public void setColor(String Color) { this.Color=Color; } public void setBreedWeight(int breedWeight) { this.breedWeight=breedWeight; } // Getter methods public String getColor() { return Color; } public int getBreedWeight() { return breedWeight; } // Labrador constructor public Labrador(String Color) { this.Color=Color; } // BreedWeight method public int avgBreedWeight() { return breedWeight; } // overiding the "Speak" method here public void Speak() { //@override super.Speak(); System.out.println("Woof"); } }

4th Aug 2020, 6:22 PM
Afraz Asher Asrar
Afraz Asher Asrar - avatar
5 Answers
+ 2
~ swim ~ Thanks bro đŸ‘đŸŒ
4th Aug 2020, 8:07 PM
Afraz Asher Asrar
Afraz Asher Asrar - avatar
4th Aug 2020, 7:42 PM
Afraz Asher Asrar
Afraz Asher Asrar - avatar