• Nandhuk 8
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 4
    Replies
public class StringArrayTest 
{
public static List<String> generateStringArray(Integer n)
{
List<String> listString = new List<String>();
  for(Integer i=0;i<n;i++)
        {
           listString.add('Test'+i);
            System.debug(listString[i]);
        }
return listString;
}
}
 i am not getting output like test 0,test1, test 2.....
can you correct my programming whether it is correct or not
 
public class StringArrayTest 
{
public static List<String> generateStringArray(Integer n)
{
List<String> listString = new List<String>();
  for(Integer i=0;i<n;i++)
        {
           listString.add('Test'+i);
            System.debug(listString[i]);
        }
return listString;
}
}
 i am not getting output like test 0,test1, test 2.....
can you correct my programming whether it is correct or not