Generalization defines a is-a-kind of relationship in which one class shares its structure and/or behavior with one or more other classes. The concept of generalization in UML is similar to inheritance in Java. It maps directly to the extends keyword. It is shown by a straight line originating from the subclass with a hollow arrowhead pointing at the nearest superclass.
The figure below depicts generalization in UML:

The equivalent Java code for this is as follows:
class Dog extends Animal {}
class Cat extends Animal {}
If you like this article, please leave a comment or subscribe this blog via RSS or via e-mail, Bookmark and share through your network. Click the AddThis button below. Thanks.