I want to get all values of a set interface in one go as a comma separated string.
For Example(Java Language):
Set<String> fruits= new HashSet<String>();
fruits.add("Apple");
fruits.add("Banana");
fruits.add("Orange");
If I print the set as fruits.toString
then the output would be:
[Apple, Banana, Orange]
But my requirement is Apple, Banana, Orange
without the square brackets.
Please suggest.