Skip to main content
Hello All, I have read the posts but just cannot see what i am doing wrong to fail the challenge.

My error is (it has been stated before):

Challenge Not yet complete... here's what's wrong: 

Executing the 'generateStringArray' method failed. Either the method does not exist, is not static, or does not return the proper number of strings.

Here is my code but i just cannot see my error ??? Can you HELP

public class StringArrayTest 

{

    //Public Method

    public static List<string> generateStringArray (Integer n)

    {

        List<string> StringArray = new List<string>();

        for(Integer i=0; i<n; i++)

        {

            StringArray.add('Test' +i);

            System.debug (StringArray[i]);

        }

            return StringArray;  

     }

}

 
9 answers
  1. Jan 4, 2017, 3:10 AM
    Hi Jon kornitsky,

    If this solves your question, please mark it as solved choosing BestAnswer and close the thread so that it will be available for others as a proper solution.

    Thanks and Regards

    Sandhya

     
0/9000