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
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.
Sign up to join this communityYou can simply use String.join
, for example:
String.join(listOfLang, ';');
Check out the String documentation here for more info.