Two methods when implementing interface containing only one

Viewed 963

I created interface TwoMethods. Source code:

interface TwoMethods<T>
{
    public void method(T t);
}

Then I created class implementing this interface and after disassembling I saw 2 methods. Class:

class A implements TwoMethods<A>
{
    @Override
    public void method(A a) {}
}

After disassembling:

class A implements TwoMethods<A> {
   A();
   public void method(A); //first
   public void method(java.lang.Object); //second
}

Similarly for Comparable interface. Why when I create parametrized interface I have 2 methods. It is always, when I use parameter? I have additionally method with Object as argument?

2 Answers
Related