Apex Use Case 16 | Chapter 75 | Salesforce Developer Masterclass

preview_player
Показать описание
Write a method that returns the sum of all numbers (till a specific number)

If you want to continue learning Salesforce (for free), Subscribe Salesforce Makes Sense here

To ensure a smooth learning experience,
I have curated playlists that will help you prepare for interviews, train on specific domains and boost your Salesforce journey.

30 Scenario Based Questions:

The Complete Administrator Course

Learn Salesforce in Bytes - Short videos on Salesforce features

Learn Salesforce With Me - Topic based Explanatory Videos

65 Salesforce Interview Questions:

100 Salesforce Interview Questions:

If you would like to acknowledge my efforts and want me to continue training and mentoring, you can support me here.

For any kind of questions, training & mentorship, queries & concerns,
Feel free to drop a mail at

That’s all from this video. See you in the next video. Till then, breathe long and keep learning :)
Рекомендации по теме
Комментарии
Автор

public static Integer useCase16(Integer num) {
Integer answer = 0;
if(num != 0) {
answer = num * (num + 1)/2;
}
return answer;
}

virajmhaiskar
Автор

public with sharing class ApexUseCase16 {
//A method that returns the sum of all numbers
public static Integer enterANumber)
{
integer sumOfNumbers = 0;
if(enterAnumber != null){
for(integer i =0; i<=enterANumber; i++){
sumOfNumbers = sumOfNumbers + i;
}
}
return sumOfNumbers;
}

}

sameershaik