• Sai Anudeep Meela
  • NEWBIE
  • 40 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 4
    Replies
Challange : Create an Apex class that returns an array (or list) of formatted strings ('Test 0', 'Test 1', ...). The length of the array is determined by an integer parameter.The Apex class must be called 'StringArrayTest' and be in the public scope.
The Apex class must have a public static method called 'generateStringArray'.
The 'generateStringArray' method must return an array (or list) of strings. Each string must have a value in the format 'Test n' where n is the index of the current string in the array. The number of returned strings is specified by the integer parameter to the 'generateStringArray' method.

And this is the code I have written :

public class StringArrayTest {

    public static String[] generateStringArray(Integer arraynum){
        String[] returndata = new String[arraynum];
           String value = 'Test ';
        returndata.clear();
        for(Integer i=0;i<=arraynum;i++) {
             returndata.add(value+i);
            System.debug('The output' + returndata);
    }
        return returndata;
}
}

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.

Not sure what is the mistake done by me in the code, can some one help me out?

Thanks,
Sai

Hi,

Thanks for the help I found the page. But I have another question I am trying to complete a challenge and was asked to create VisualForce page and was mentioned to add a snippet to create a page for that, but when I am trying to do that it failing with an error message.

Here is the error message:

[Error] Error: FlowPage line 2, column 26: Open quote is expected for attribute "name" associated with an element type "flow:interview"
[Error] Error: Open quote is expected for attribute "name" associated with an element type "flow:interview".

Here is the code tried for
<apex:page>
  <flow:interview name = “New_Customer_Flow” />
</apex:page>


Any help would really be appreciated.

Thanks,
Sai
Hi,

I am trying to complete trail head, and came across Visualforce Pages stuff, I dont see any results when I do a search in quick serach box after going in setup.

Please let me know if I am doing any mistake, any help is really appreciated.
Hi, I am trying to complete a challenge for that I was intended to create a user for a custom profile, but when trying to create a user for the profile it is not giving me an option for field USER LICENCE as SALESFORCE.For licence salesforce there are options of getting custom profile, other than I am getting difference licences, please let me know how can I change the setting to see the salesforce as user an option in user licene filed, when trying to create a user.

Hi,

Thanks for the help I found the page. But I have another question I am trying to complete a challenge and was asked to create VisualForce page and was mentioned to add a snippet to create a page for that, but when I am trying to do that it failing with an error message.

Here is the error message:

[Error] Error: FlowPage line 2, column 26: Open quote is expected for attribute "name" associated with an element type "flow:interview"
[Error] Error: Open quote is expected for attribute "name" associated with an element type "flow:interview".

Here is the code tried for
<apex:page>
  <flow:interview name = “New_Customer_Flow” />
</apex:page>


Any help would really be appreciated.

Thanks,
Sai
Hi,

I am trying to complete trail head, and came across Visualforce Pages stuff, I dont see any results when I do a search in quick serach box after going in setup.

Please let me know if I am doing any mistake, any help is really appreciated.
Hi, I am trying to complete a challenge for that I was intended to create a user for a custom profile, but when trying to create a user for the profile it is not giving me an option for field USER LICENCE as SALESFORCE.For licence salesforce there are options of getting custom profile, other than I am getting difference licences, please let me know how can I change the setting to see the salesforce as user an option in user licene filed, when trying to create a user.