I have two classes
A Dog class whose constructor does not accept arguments,public class Dog<pet> extends Animal<pet>{}
whose constructor does not accept any arguments
andpublic class Animal<pet>{}
whose constructor accepts one argument
public class Dog<pet> extends Animal<pet>{
public Dog(){
super(/*what should go here?*/);
//Constructor accepts no arguments
}
}
public class Animal<pet>{
public Animal(E name){
//Constructor accepts one argument
}
}
I need to pass an E type argument to super() inside the constructor of the Dog<pet> class.
How can I do this without passing any arguments to the dog constructor?
Thanks