It is the process in which we can reuse our code and we can also extend the functionality of class in to the other class.
Public class 2005
{
Public string keypress ()
{
Return “Key press of car”;
}
}
Public class 2008:2005
{
Public string music system()
Return “ music system”;
}
{
Class 2008 c = new class 2008()
c.keyPress ();
c.musicSystem ();
}
Public class 2005
{
Public string keypress ()
{
Return “Key press of car”;
}
}
Public class 2008:2005
{
Public string music system()
Return “ music system”;
}
{
Class 2008 c = new class 2008()
c.keyPress ();
c.musicSystem ();
}
Comments
Post a Comment