Below I have a Person interface, an implementing class and a driver class which initialises the Person with a name and just outputs it again. What is the advantage of using
It depends on how you want to use Person.
As it stands, you don't gain any real benefit from having it an interface.
However, suppose there were aliens who could also be considered a "Person" because of their behaviors (say "talks(), walks(), thinks(), feels()) that are defined in Person. Now you might want to separate "Person" from "Human" and "Alien" so that individuals from two very different hierarchies -- say "Humans" in the "mammal" hierarchy and "Aliens" in the "arachnid" hierarchy -- could both implement the Person interface.