ApexGuru or ApexLearner Quiz 1

ApexGuru or ApexLearner Quiz 1

Can you please help us to find out what will be the correct output on console log for below code snippet as for us this code snippet looks like above image :)

Integer apexGuru = 0;
Integer apexLearner = 0;
List<Case> caseList = new List<Case>();

for(Integer i = 0 ; i < 312 ; i++){
	Case cs  = new Case(Status='New');
	caseList.add(cs);
}

insert caseList;

for(Case csGuru : [Select id,Status from Case where Status = 'New'] ){
     apexGuru++;
}

for(List<Case> csChela : [Select id,Status from Case where Status = 'New'] ){
    apexLearner++;
}

System.debug('ApexGuru got score as :' + apexGuru);
System.debug('ApexLearner got score as :' + apexLearner);



 
  


Let's see who can predict the output. Let us know the output in the comment section without giving facts so everyone can participate with his or her own efforts.

Note ** Please don't execute this code in ORG and paste the output here.

#HappyLearning #FoodForAll #SalesforceOhana #TheoryOfZero


Chaitanay Aggarwal

??Full Stack Engineer | ??Tech Enthusiast with Expertise in JavaScript, React, Angular, and Node.js | Delivering Innovative Solutions ?? | Let's Build Exceptional Web Experiences!?

7 年

ApexGuru got score as :312 ApexLearner got score as:2

回复
Surendra Choudhary

Salesforce 9x Certified | Application Architect | Einstein Analytics and Discovery | Service Cloud | Platform Developer-2 | Servicemax | FSL

7 年

The code will give error at below line: for(List<Case> csChela : [Select id,Status from Case where Status = 'New'] ){

回复
Rajneesh Raj ?

11x - Certified Salesforce Engineer

7 年

ApexGuru - 321 ApexLearner - 2 For every bulk operation in Salesforce work default size I.e 200. whether it is batch size, default soql records or trigger records. so here in 2nd for loop records comes in size of 200 each.

回复
Nishant Prajapati

Technical Lead | 4x Certified Salesforce Developer | APEX | Visualforce | JavaScript | Aura | LWC | Integration

7 年

ApexGuru got score as :312 ApexLearner got score as :2

回复

要查看或添加评论,请登录

Viren Sa的更多文章

  • Sometimes Age and Certification count comes alone !

    Sometimes Age and Certification count comes alone !

    Here are few things which I should ask to myself ? 1. Do I judge maturity level of person with his/her Age ? 2.

    1 条评论
  • Outcome is same but journey experience matters !

    Outcome is same but journey experience matters !

    “Success is a journey, not a destination. The doing is often more important than the outcome.

    1 条评论
  • WORA : Write Once Use Everywhere

    WORA : Write Once Use Everywhere

    Hello Bhaiyo and Bhano, Ladies and Gentleman, Boys and Girls. I hope you have heard about this phrase Necessity is the…

    1 条评论
  • ApexGuru OR ApexLearner Quiz 2

    ApexGuru OR ApexLearner Quiz 2

    Unpredictability means what it means. I don't know how you define it.

    3 条评论
  • What will be the output ?

    What will be the output ?

    Assume we have one Trigger defined on Case Object in Salesforce. Trigger code will look like below.

    3 条评论
  • How much difficult to learn Salesforce ( Admin Role)

    How much difficult to learn Salesforce ( Admin Role)

    **NO TECHNICAL BACKGROUND REQUIRES TO LEARN SALESFORCE ADMIN :) Before to understand how much difficult to learn…

    4 条评论
  • ForceFunda has been launched

    ForceFunda has been launched

    Key to unlock excellence in Salesforce for a beginner as a duck takes to water. Introduction video is here.

社区洞察

其他会员也浏览了