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
Using the interface instead of the concrete class would let you change the implementation later.
This about JDBC, all of it is based on interfaces, so the driver can implement it later.
For instance when you use a ResulSet you don't really care how or what underlaying implementation is ( with a Oracle Driver would be something like OracleResultSet, with a MySQL driver could be something like MySQLResultSet ) but you know what methods are available for you to use.
Same goes with List or Map, instead of ArrayList or HashMap