When dealing with inheritance, I've found that it is most important to remember one simple rule:
You can use a child anywhere a parent is expected. Note, this says you can use a child anywhere a parent is expected. It doesn't say that you can use a sibling or cousin or whatever. When you have an inheritance relationship, you have an "is a" relationship. Take the following example:
I hope this makes sense to you. Here's another way to explain it.
A child class is a specialization of a parent class. Let's assume we have the class Animal. An animal class might have a few basic traits, like a name, number of feet, a backbone, etc. Here's a simple Animal class:
Now, let's think about a couple things that might extend Animal, such as bird and dog. What might those classes look like. Obviously, they'll have everything that an Animal would have, but they'll each have a little bit more. Here are some class definitions for Bird and Dog:
As you can see, a bird "is a" type of animal as a dog "is a" type of animal. Therefore, the following code snippet is legal:
Since a variable of type Animal can reference anything that "is an" animal, we can assign an Animal object, a Bird object, or a Dog object to it. Now, what happens if we try to assign a Dog object to a Bird variable:
Since b is a Bird variable, we should be able to call it's layEggs method. Yet, we've tried to assign a Dog object to b. Can a dog lay eggs? Not one that I've ever seen!

Since a dog "is not" a bird, we can't assign a dog to a bird variable (and vice versa).
Also, what about assigning parents to siblings. Look at this code:
Once again, since d is a Dog reference, we should be able to tell anything that is assigned to it to catch a frisbee. But, can any animal catch a frisbee? Can a frog? or a tadpole? An animal "is not" a dog, rather a dog "is a" animal. Therefore, you can't assign a parent to a child variable, either.
I know this reply has gotten horribly long, but this is an
essential topic and you'll have to understand this very well if you want to go far with Java. Please let me know if you're still having problems.
Corey