You need to sign in to do that
Don't have an account?
Problem with Verifing trailhead Module
Hi All,
I am having problem with verifing this module.Its very simple but i am not able to verify this.
Module:
Create an Apex class that returns an array (or list) of formatted strings ('Test 0', 'Test 1', ...). The length of the array is determined by an integer parameter.
The Apex class must be called 'StringArrayTest' and be in the public scope.
The Apex class must have a public static method called 'generateStringArray'.
The 'generateStringArray' method must return an array (or list) of strings. Each string must have a value in the format 'Test n' where n is the index of the current string in the array. The number of returned strings is specified by the integer parameter to the 'generateStringArray' method.
public class StringArrayTest { public Static List<string> generateStringArray(Integer n){ integer i=1; List<String> rtn = new List<String>(); for(i =1;i<=n;i++){ rtn.add('\'Test '+i+'\''); } return rtn; } }
All Answers
-------------------
Thanks,
Srinivas
- Please mark as solution if your problem is resolved.
Please check below post for same issue
1) https://developer.salesforce.com/forums/?id=906F0000000BTQ9IAO
Please try below code:- And go :
Your Name>Developer Console>Debug>Open Execute Anonymous Window
Paste below code in it Let us know if this will help you
Thanks
AMit Chaudhary
Thanks Siddharth Mani... that helped thank you for your reply.That worked perfectly.
@Srinivasa Reddy S i tried with 0 but it did not worked . i am sorry i should be more specific in my post.
@Amit Chaudhary thanks for your reply.