How to concatenate as string in Salesforce?

String Str = '';
Integer Val1 = 123;
Integer Val2 = 456;

Str = String.valueOf(Val1) + String.valueOf(Val2);
System.debug(Str); //value will be 123456

No comments:

Post a Comment