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

2

You can simply use String.join, for example:

String.join(listOfLang, ';');

Check out the String documentation here for more info.

  • 1
    you have beat me on this. – Tushar Sharma Jan 18 '17 at 7:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.