3

I saw this in book:

class Student implements Person,Named
{
    public String getName(){return Person.super.getName();}
}

There is a same method in Person and Named called getName().

I have never seen the grammar above before.

I know super.getName() means it called the parent's method, but why must it be called with Person there?

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
lxacoder
  • 191
  • 1
  • 11

0 Answers0