接口不能实例化对象但是以接口为数据类型的参数可以实例化对象接口可以作为参数类型, Connection connection = DriverManager.getConnectionDriverManager.getConnection() 的返回参数类型为 Connection 的connection.createStatement() 的返回参数类型为 Statement