Check out example codes for "how to add integers in java". It will help you in understanding the concepts better.

Code Example 1

int a;
int b;
a+b = int c

Code Example 2

public class AddTwoNumbers {

   public static void main(String[] args) {
        
      int num1 = 5, num2 = 15, sum;
      sum = num1 + num2;

      System.out.println("Sum of these numbers: "+sum);
   }
}

Learn ReactJs, React Native from akashmittal.com