my dog learned polymorphism*
The moose likes Beginning Java and the fly likes converting string array to string Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "converting string array to string" Watch "converting string array to string" New topic
Author

converting string array to string

Aashish Paruthi
Greenhorn

Joined: Apr 13, 2003
Posts: 7
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

Joined: Dec 05, 2002
Posts: 28
Try this...
Aashish Paruthi
Greenhorn

Joined: Apr 13, 2003
Posts: 7
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

Joined: Aug 20, 2001
Posts: 1817

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.


Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
Aashish Paruthi
Greenhorn

Joined: Apr 13, 2003
Posts: 7
Thanks.
I got some fundamentals straightened out.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: converting string array to string
 
Similar Threads
converting a double to a String
comparing Stings help
IP C-Class
Local Array
restart a loop with labelled break