interface CallBack
{
void callBack(int param);
}
class Client implements CallBack
{
public void callBack(int p)
{
System.out.println("Call back called with :"+p);
}
void nonIterfaceMeth()
{
System.out.println("Classes that implements interface .");
}
}
class AnoterClient implements CallBack
{
public void callBack(int m)
{
System.out.println("Anoter vision of callBack");
System.out.println("p squared is "+(m*m));
}
}
public class TestFace
{
public static void main(String args[])
{
CallBack p1=new Client();
AnoterClient ob=new AnoterClient();
p1.callBack(42);
p1=ob;
p1.callBack(3);
}
}