Last active
November 21, 2018 06:49
-
-
Save ganmahmud/ff0096d2dbe0d04cb1c46cabd1266471 to your computer and use it in GitHub Desktop.
Create an Apex class with a method that returns an array (or list) of strings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class StringArrayTest { | |
| public static String[] generateStringArray(Integer numOfStrings) { | |
| // Create a generateStringArray object | |
| String[] stringArr = new List<String>(); | |
| for(Integer i=0;i<numOfStrings;i++) { | |
| stringArr.add('Test '+i); | |
| } | |
| return stringArr; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment