This course is currently a work in progress. Please join the waitlist to receive regular updates.

How to add two numbers in apex

In Apex, you can use the + operator to add two numbers.

The following code snippet shows how to add two numbers in apex.

Loading...

In the above example:

  • The variables numb1, numb2 areInteger variables.
  • The variable sum store the sum of numb1, numb2.

Try It Yourself

Loading...