I remember on my previous web development job that they have something like this:
sampleClassBean.java:
public class sampleClassBean
{
public String doSomeStrings(String a, String b){}
public Int doSomeInt(Integer i, integer j){}
public Boolean doSomeBoolean(Boolean result){}
}
and then there's sampleClassBeanImpl
public class sampleClassBeanImpl
{
public String doSomeStrings(String a, String b)
{
//do some process
return "";
}
public Integer doSomeInt(Integer i, Integer j)
{
//do some process
return 0;
}
public Boolean doSomeBoolean(Boolean result)
{
//do some process
return false;
}
}
For what I understand is that, there's 2 class, 1st class that declare methods, now 2nd class's methods will depend on what is declared on the 1st class. If the 2nd class create a method that is not declared in 1st class there will be an error. Hope you understand what i'm saying.
What I need to know is what exactly that? What do you call that process? How to do that? What are the benefits of doing that? Is it a good programming practice?