I have this below method
public List<Object> ProductbyJobcode (String jobcode)
{
List<Object> temp = new ArrayList<Object>();
temp = riskJobCodeProductMappingDAO.fetchProductByJobCode(jobcode);
return temp;
}
and i am taking the input in the Object list from the above method into Object type of list
List<Object> temp = new ArrayList<Object>() ;
temp = ProductbyJobcode(jobcode);
now i am trying to retrieve the value into string but i am getting exception, please advise how to achieve the same how i will convert the object to string
String Product ;
String Actiontype;
for (int i = 0; i < temp.size(); i++) {
product = temp.get(0).toString();
Actiontype = temp.get(1).toString();
}
templist?