• Post Reply Bookmark Topic Watch Topic
  • New Topic

array list to string question  RSS feed

 
shashank beerla
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a list whose values are shown below
List lt = {"india","pakistan","india,pakistan"}
when I convert this list to string i should get the output like
String str = 'india','pakistan','india,pakistan'
The code available in the internet gets me this output
String str = 'india','pakistan','india','pakistan' - all the comma seperated are delimited to quotations
 
K. Tsang
Bartender
Posts: 3648
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are you splitting the elements? Are you using regular expressions or something else?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!