About Lesson
This class covers the below topics
- Introduction to Programming
- Variables in Apex
- Data Types in Apex
Hands-on Exercise:
- Declare an Integer variable named age with a value of 25 and output it to the debug log.
- Declare an Integer variable named age with a value of 25 and update the same age variable to 60 in the next line and display it via debug log.
- Capture two ages age1, age2 in two different Integer variables with values 30, 25 and calculate the age difference between them, and store the difference in a third Integer variable agedifference and output the difference to the debug log.
- Declare 2 integers a and b with two values 35, 26 and Swap these numbers that are stored in a,b.
- Declare 2 integer variables a, b with values 70, 50 and store their sum in another variable named agesum.