Creating object with reference to Interface

In Dao pattern DaoImpl object is created with reference to dao interface.
This commit is contained in:
Amit Bhoraniya 2016-02-19 00:10:55 +05:30
parent bd82387fc1
commit b70614efef

@ -29,7 +29,7 @@ public class App {
* @param args command line args.
*/
public static void main(final String[] args) {
final CustomerDaoImpl customerDao = new CustomerDaoImpl(generateSampleCustomers());
final CustomerDao customerDao = new CustomerDaoImpl(generateSampleCustomers());
log.info("customerDao.getAllCustomers(): " + customerDao.getAllCustomers());
log.info("customerDao.getCusterById(2): " + customerDao.getCustomerById(2));
final Customer customer = new Customer(4, "Dan", "Danson");