Simple for loop
Apex Class
Simple for loop
public class insert100
{
public void m1()
{
List<Testing__c> lstTesting = new List<Testing__c>();
Testing__c objTest;
for(Integer i=6;i<=100;i++)
{
objTest=new Testing__c(name='Testing'+string.valueof(i),city__c='City'+string.valueof(i));
lstTesting.add(objTest);
}
insert lstTesting;
}
}
Simple for loop
Reviewed by dasfrogpractice
on
22:53
Rating:
No comments: