3
interface A<T>
{
   void method1(T a)
   {
   }
}
class B implements A<Integer>
{
   void method1(Integer a)
   {
   }
}

But at the runtime interface A would like:

interface A
{
   void method1(Object a)
   {
   }
}

so how method1 in class B is implementing the method1 in interface A as argument types will be different at runtime. So shouldn't it flag compile error as method1() of interface A has not implemented.

azro
  • 53,056
  • 7
  • 34
  • 70
Rishab Shinghal
  • 591
  • 3
  • 16

0 Answers0