I tried to run these codes but Netbean kept showing up non-static variable this can not be referenced from static context. I will appreciate your answer if some guys someone can show me why. Thanks!
Code here:
abstract class Bike {
abstract void Run();
}
class Honda extends Bike {
void Run() {
System.out.println("Running Safely");
}
}
public static void main(String arg[]) {
Bike obj = new Honda();
obj.Run();
}
}