OK.... I am learning interfaces. But... I still havent found what they are for. I know you declare and interface like this:
public abstract interface inter
{
int a=1;
public void hola1();
}
Now... the methods cant contain code. WHY? Then why would I want to implement an interface if I am only implementing names and not code? If I have to code the method in my class anyway... why would I want to implement the interface?
I know there something I am missing... can somebody please explain???




Reply With Quote