class Thing {}
class Fruit extends Thing {}
class Banana extends Fruit {}
class Apple extends Fruit {}
class Animal extends Thing {}
class Dog extends Animal {}
class Monkey extends Animal {}
^^ that pretty much sums up how to do it
but inheritance is basically the guts of java, super duper important concept to understand. So i suggest sitting down with a good java book for a couple hours, and completely grasp the ideas of inheretance, polymorphism, encapsulation .. all that good stuff.
personally i like The Complete Reference books. i studied with them and they really do help alot