• kotipalli srikanth
  • NEWBIE
  • 10 Points
  • Member since 2018
  • JOY

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 0
    Replies
Hello.
Anyone, please provide me a legit guide to avail sample projects for practicing.
Hello, SFDC people.
I am a beginner,
My doubt is that we write the program using APEX Class and also as well as through Anonymous window, what is the difference in writing code on either of them.
please explain me, Thank you.
Hello, Sfdc people.
I referred the following statement somewhere and found an ambiguity;
public return type methodname (integer n )
{
for (integer i=0; i<=n; i++)
{
..............
}
}

The question is the "integer n" has not given any value, so how the for loop executes?
please explain me..
public class StringArrayTest {
    public Static List<String> generateStringArray(integer n){
/* i want to know that, here the integer n is  not initialized with any value, so how i<n works*/
         List<String> myArray = new List<String> ();
        for(integer i=0; i<n; i++){
            myArray.add('Test' +i);
            System.debug(myArray[i]);
        }
            return myArray;
    }
}
// And also my above program is failing .
//help me please.