Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Get Started with Apex from (module-Apex Basics & Database)
- --------------------------------------------
- The Apex class must be called StringListTest and be in the public scope :
- SOURCE CODE:
- public class StringListTest {
- public static List<String> generateStringList(Integer n) {
- List<String> TestList = new List<String>();
- for(Integer i=0;i<n;i++) {
- TestList.add('Test ' + i);
- System.debug(TestList[i]);
- }
- return TestList;
- }
- }
- --------------------------------------------
- The Apex class must have a public static method called generateStringList :
- SOURCE CODE:
- StringListTest.generateStringList(5);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement