samedi 29 février 2020

Java creating objects for different arguments

is there any way to create objects for the same model which is calling again and again. Or any best practice even design pattern. Note- Cannot take map

Example-

**MothlyData** mdapril = dao.getData("April");
**MothlyData** mdmay = dao.getData("May");
**MothlyData** mdjune = dao.getData("June");
**MothlyData** mdajuly = dao.getData("July");
**MothlyData** mdaaug = dao.getData("Aug");
**MothlyData** mdasept = dao.getData("Sept");

Aucun commentaire:

Enregistrer un commentaire