I'm trying to set parameters for a abstract class:
public abstract class NewMath {
public abstract int op (int intOne, int intTwo);
}
Here is the extended subclass:
public class MultMath extends NewMath {
public int op (int intOne, int intTwo){
return intOne + intTwo;
}
}
But when I try to instantiate an object while defining the parameters like this:
public class TestNewMath {
public static void main(String [] _args) {
MultMath multObj = new MultMath(3,5);
}
}
It doesn't work. It gives me this error:
TestNewMath.java:3: cannot find symbol symbol : constructor AddMath(int,int) location: class AddMath AddMath addObj = new AddMath(3, 5);
I know I'm missing something. What is it?