Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Converting List to String?

807603Oct 26 2007 — edited Oct 26 2007
I am trying to convert a List to a String. can someone please tell me what is wrong with this code. Thanks


List x = (List)request.getAttribute("setNum");// getting the attributes that I get for setNum that is in a list array
// String y[]= (String[])request.getAttribute("eachNumber");
String z= null;
for (int j= 0; j< x.size(); j++)
{
z= List.toString(x.get(j));
}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 23 2007
Added on Oct 26 2007
8 comments
202 views