Click here to Skip to main content
15,900,973 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Convert from int arraylist to string arraylist and double arraylist to string arraylist
Posted

I guess the only way is to iterate over the existing integer/double list and instantiate the items in string list.

Something like this:

Java
List<Integer> oldList = ...

List<String> newList = new ArrayList<String>(oldList.size())
for (Integer myInt : oldList) {
  newList.add(String.valueOf(myInt));
}
 
Share this answer
 
Comments
DamithSL 15-Nov-14 7:05am    
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900