Dear Kouisawang,

An interface is like a set of common methids used by different
classes.
For example
say a class called vehicle implements an interface called vInterface

the vInterface may have the methods which tells the vehicle how to
move, how to run the engine, how to access the fuel, how to rotate
the wheel etc etc.

So this interface can be used by all the vehicles

But inheritance is different it says which all properties should be
inherited or taken from its parent.

For example we can say
1) car extends vehicle
2) bus extends vehicle
3) bike extends vehicle

So all the three(bus, car, bike ) extends from the class vehicle
which means all these three has all the features of the vehicle
class and they can also have their own properties

Hope you understood the above brief description .

Regards
Sudhi


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to