title: java - using methods to add two numbers
body: <p>Building a simple program that does addition problems using methods, static variables and methods, and final variables. I have started the program with the following code below yet I am running into 4 errors with what I have. I have included all the errors that I am getting along with my .java file.</p>
  
  <p>The goal is to try to get the output 2 numbers for the user to add together and to tell if it is true or false.</p>
  
  <p><strong>Error in Command Prompt:</strong></p>
  
  <pre><code>CAI.java:43: error: '.class' expected
                  int max = 50; int min = 1;
                      ^
  CAI.java:43: error: illegal start of expression
                  int max = 50; int min = 1;
                          ^
  CAI.java:43: error: ';' expected
                  int max = 50; int min = 1;
                           ^
  CAI.java:44: error: not a statement
                  rand.nextInt((max - min) + 1) + min;
                                                ^
  4 errors
  </code></pre>
  
  <p><strong>CAI.java</strong></p>
  
  <pre><code>import java.util.Scanner;
  import java.util.Random;
  
  public class CAI
  {
      static Scanner input = new Scanner(System.in);
  
      static int addition;
  
      //main method
      public static void main(String[] arguments)
      {
          //declare variables
          String name;
          int addition;
          int subtraction;
          int multiplication;
          //boolean = true;
  
          //welcome the user
          System.out.println("Welcome to Computer Assisted Instruction");
  
          //get the user's name
          System.out.print("Enter your name: ");
          name = input.next();
  
          System.out.printf("Hi %s. Let's practice addition!", name);
      }   
  
  
      private static boolean addition(int num1, int num2)
      {
          return (num1+num2)
          //generate double digit numbers positive and negative
          int max = 50; int min = 1;
          rand.nextInt((max - min) + 1) + min;
          //Addition
          System.out.printf("What is %d + %d? ", a,b);
          addition = input.nextInt();
      }
  
  
  
  }
  </code></pre>