Perfect. Glad to help.
Type: Posts; User: GregBrannon
Perfect. Glad to help.
Instead of returning Animal.numberOfLegs, try:
return numberOfLegs;
As for removing the word 'static' everywhere, I'm all for it, but I hadn't analyzed what problems that may cause. Let us...
No, I didn't say that. I said that the specific variable, numberOfLegs in the class Animal should not be static. Static nested classes is an entirely different subject, related to this topic only...
This in Animal:
public static int numberOfLegs;
should not be static. Making it static means that all subclasses "share" the variable numberOfLegs. This is also called a "class variable,"...