Stephan, just to add to the previous reply...
Your last 3 questions about traversing the inheritance tree:
Your example, where Wolf is a subclass of animals:
animals s=new Wolf();
s.roam();
The JVM traverses the inheritance tree. If Wolf overrides the roam method, then that's the method that will be used. If Wolf does not override the method, then the JVM will walk up the inheritance tree to find the first superclass with that method in it.
The compiler makes sure that Wolf is a subclass of animals, and the compiler lets you call s.roam() because roam() is a method in class animals. It doesn't know/care that s is really of type Wolf, or whether class Wolf overrides the roam() method. (This is because s might be different subclasses, depending on how you write your code and what happens at runtime). The compiler lets you call roam() on s because it knows that roam() is at least defined in class animals, then every subclass of animals has to either a) inherit the method, or b) override it. Thus, Wolf has a roam() method.
Does this give you a better idea of the mechanism?
Bryan