0

What about an interface that passes itself as a parameter in a method? How das that work? I always thought that an interface is abstract - so how can it be used just like that inside a method?

The only post I could find according to that topic did not really satisfy me.

public interface Comparable{
     boolean compare(Comparable comparable);
}
Community
  • 1
  • 1
jublikon
  • 3,427
  • 10
  • 44
  • 82

0 Answers0