You need to sign in to do that
Don't have an account?
Heiner Goehlmann
Executing the 'generateStringArray' method failed
Hi Dev Community,
I am running crazy: since yesterday I have tried for hours and hours to pass the check, read plenty of threads in this forum, but have not yet passed the check.
This is my actual status:
May I ask for your help, please?
BTW: where may I find instructions on how to add apex code into posts?
I am running crazy: since yesterday I have tried for hours and hours to pass the check, read plenty of threads in this forum, but have not yet passed the check.
This is my actual status:
public class StringArrayTest { // public static method generateStringArray public static List<String> generateStringArray( Integer n ) { // Make i known Integer i; // Initialize table of strings List<String> table = new List<String>(); // Add elements to the list for (i=0; i<n; i++); { table.add('Test ' + i); } return table; } }What the hell is wrong? There must be something I do not see, but what is it?
May I ask for your help, please?
BTW: where may I find instructions on how to add apex code into posts?
Try with below code it will work .Only probelm is that you have added semicolon after for loop .
Let me know if it helps !!
Thanks
Manoj
All Answers
Try with below code it will work .Only probelm is that you have added semicolon after for loop .
Let me know if it helps !!
Thanks
Manoj
you just made my (sun)day. Thanks a lot - that change made the method work.
Regards, Heiner