Is it good to use hashmap instead of using the object class...... Using Hashmap....
Map<String, String> cellMap = new HashMap<String, String>();
int j = 0;
while (cellIter.hasNext())
{
HSSFCell myCell = (HSSFCell) cellIter.next();
cellMap.put(columnMap[j], myCell.toString());
j++;
}
And using object class.....
ABC abc= new ABC();
abc.setA(myRow.getCell(0).toString());
abc.setB(myRow.getCell(1).toString());
abc.setC(myRow.getCell(2).toString());
Please tell me in the context of application health, memory requirement etc ...
See Question&Answers more detail:os