You need to sign in to do that
Don't have an account?
Brock Shagena
Hello, Started working on the " getting started with Apex" trail. I wrote the code based on my understanding of the requirements .Not sure what I am missing it seems to work when I run it in the dev console. See code below. Thanks
public class StringArrayTest {
public static List<String> generateStringArray(){
Integer iteration = 5;
List<String> testList = new List<String>{};
for(Integer i =0; i < iteration; i++){
testList.add('Test'+ ' ' + i);
system.debug(testList.get(i));}
Return testList;
}
}
public static List<String> generateStringArray(){
Integer iteration = 5;
List<String> testList = new List<String>{};
for(Integer i =0; i < iteration; i++){
testList.add('Test'+ ' ' + i);
system.debug(testList.get(i));}
Return testList;
}
}
Executing the 'generateStringArray' method failed. Either the method does not exist, is not static, or does not return the proper number of strings.
Your Name>Developer Console>Debug>Open Execute Anonymous Window
Paste below code in it Check below post for more info
https://developer.salesforce.com/forums/?id=9060G000000I2bhQAC
Let us know if this will help you