You need to sign in to do that
Don't have an account?
Deepika Reddy 16
The following trailhead doesnt work for me can someone tell me error plz................
Deepika Reddy 16
The following code doesnt work for me.....
CODE:
public class StringArrayTest
{
public static list<string> generateStringArray(integer n)
{
list<string> t =new list<string>();
for(integer i =0;i<n; i++)
{
t.add('Test'+ i);
}
return t;
}
}
ERROR:
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.
The following code doesnt work for me.....
CODE:
public class StringArrayTest
{
public static list<string> generateStringArray(integer n)
{
list<string> t =new list<string>();
for(integer i =0;i<n; i++)
{
t.add('Test'+ i);
}
return t;
}
}
ERROR:
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.
Use this code. Regards,
Ajay
t.add('Test '+ i);
Try below code;