suppose in case of class like
class person
{
String name;
public void setName()
{
}
}
class labor extends Person
{
}
in that case sub class can reuse the base class data member and function but in the case of interfaces
interface person
{
public void setName();
}
class labor extends Person
{
}
here we have to give the implementation of a function then if we must have to give the implementation of a function than what is the benifit of a interfaces because if we have to give the definition then without interface we can write a new function in a class and do every thing?