1
List<String> listoflang=new List<String>();
listoflang.add('Apex');
listoflang.add('PHP');
listoflang.add('Java');

and I want this list to be converted in string like this Apex;PHP;Java

1 Answer 1

2

You can simply use String.join, for example:

String.join(listOfLang, ';');

Check out the String documentation here for more info.

1
  • 1
    you have beat me on this. Commented Jan 18, 2017 at 7:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .