Does the compiler view an exact copy of an abstract method in a child class as an override (see abstract method in Car class below)? This for example compiles and runs :
interface Vehicle {
public abstract void goUpHill(); // Abstract method
}
abstract class Car implements Vehicle {
public abstract void goUpHill(); // Abstract method another copy!
// is this an override? does the compiler view this as an override?
}
public class TestOneMini extends Car {
public static void main(
String[] args){
//TestOneMini tm = new TestOneMini();
//tm.goUpHill();
Car tm = new TestOneMini();
tm.goUpHill();
}
public void goUpHill() {
System.out.println("Going up a hill!");
}
}
Thanks in advance!