I have the below pojo named eurrexcashMessageObject with corresponding setters and getters
public class eurrexcashMessageObject implements Cloneable{
private String PaymentDate;
private String CCPTradeId;
private String Currency;
private String Contract_Id;
private String PaymentAmount;
//include seeters & getters also
}
now there is a method in which i am retrieving the list
List<eurrexcashMessageObject> listcashmessage1 = eurexcashParsing.getcashmessageojects();
so as you can see that list which is retrieved is of eurrexcashMessageObject type now i am iterating over the list as shown below..
for(int i = 0; i < listcashmessage1.size(); i++)
{
String PaymentDate = String.valueOf(listcashmessage1.get(0));
String CCPTradeId = String.valueOf(listcashmessage1.get(1));
String Currency = String.valueOf(listcashmessage1.get(2));
String Contract_Id = String.valueOf(listcashmessage1.get(3));
String PaymentAmount = String.valueOf(listcashmessage1.get(4));
now i can see that in variable PaymentDate the string is not store and similar is the case for CCPTradeId,Currency,Contract_Id,PaymentAmount can you please advise how can i convert the list contents into string within for loop