actually subtypes and subclases are same...
No, they aren't!
Subtyping means (as stated above) interface inheritance, that is a class is a subtype of another class or interface, if it conforms to its interface. HashMap is a subtype of Map and of Object, for example.
Subclassing means implementation inheritance, that is a subclass reuses some implementation of its superclass. In java, subclassing is always also subtyping, but there are languages like C++ where you can privately inherit from a class, so that you don't inherit the public interface.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus