I am getting this No enclosing instance of type 'Abstraction' is accessible problem while trying an abstraction class .
public static void main(String[] args) {
Horse h = new Horse(); //getting problem here`enter code here`
h.walk();
}
abstract class Animal {
abstract void walk();
}
class Horse extends Animal {
void walk() {
System.out.println("Walks on 4 legs");
}
}
can anyone please help me to solve this problem