Philip Grove wrote:One problem with your list is that a method called getConnection that can be used on both a java.sql.DriverManager and a javax.sql.DataSource to get a java.sql.Connection, so actually 1 covers 2 methods.
+1. And those are the only methods; all others boil down to these at the end, even though there may be N ways to write code to do so.
I've always been puzzled by this kind of question. "How many ways are there to create an object" is another popular one. Are these interview question? If so, they're strange ones to ask.