I wrote the following code in my application. ( office work )
@Override
public List<Outlet> getAllOutletForTouch() {
return outletDao.getOutlets();
}
This is the code one of my colleagues wrote.
@Override
public List<Outlet> getAllOutletsForMobile() {
List<Outlet> outletList = outletDao.getOutlets();
return outletList;
}
He created a new variable, assigned the values, and then returned the values; whereas I just returned the values directly calling the method. What is the convention for doing this?