mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-14 14:58:39 +00:00
Creating object with reference to Interface
In Dao pattern DaoImpl object is created with reference to dao interface.
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user