Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

converting string array to string

 
Aashish Paruthi
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to convert array of strings to string joined by ','(comma).
I have been trying to use
String []vars;
String someString=arrayToString(vars,',');
I get the following error:
cannot resolve symbol
 
Balaji Natarajan
Greenhorn
Posts: 28
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this...
 
Aashish Paruthi
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, but I was trying to use a predefined function in util or array class and it would give me as I mentioned "
cannot resolve symbol" . I wanted to know if the method exists or is it deprecated.
Which classes should I import or should I make it work?
 
Joel McNary
Bartender
Posts: 1824
Eclipse IDE Java Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Two things:
1). Remember, any method call without an object becomes a method call to this. So your call to "arrayToString" is looking for that function in the current class.
2). I don't know of any standard Java class that will do what you are asking to do here. A quick search on Google shows that many people have written this method, but I don't see that this is part of SUN's API.
 
Aashish Paruthi
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.
I got some fundamentals straightened out.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic