title: I am getting this message: Error: b cannot be resolved to a variable
body: <p>Here is my code that I have. Can someone please help me figure this out? I am getting a compiler error with the message:</p>
  
  <p>2 errors found:
  File: C:\Users\Keith\Desktop\Prog Files\HW4ChrisMuncher.java  [line: 13]
  Error: a cannot be resolved to a variable
  File: C:\Users\Keith\Desktop\Prog Files\HW4ChrisMuncher.java  [line: 19]
  Error: b cannot be resolved to a variable</p>
  
  <pre><code>import java.util.Scanner;
  public class HW4ChrisMuncher
  {
    public static void main(String[] args) 
    {
      Scanner input = new Scanner(System.in);
  
      System.out.println("Enter a number");
      double userNum = input.nextDouble();
      a = userNum;  
  
      Scanner input2 = new Scanner(System.in);
  
      System.out.println("Enter a number (no decimals!)");
      double userNum2 = input2.nextDouble();
      b = userNum2;  
  
  
  
      double a;
      int b;
      double c = min(a, b);
      double d = max(a, b);
      double e = abs(a);
      double f = pow(a, b);     
  
  
  
      System.out.println("Minimum Value of 11 and 8 is " + c );        
      System.out.println("Maximum Value of 11 and 8 is " +d );
      System.out.println("The absolute value of 11.5 is " +e );
      System.out.println("11.5 to the power of 8 is " +f );
  
    }
  
    // Returns the minimum of two numbers
    public static double min(double n1, int n2) 
    {
      double min;
        if (n1 &gt; n2)
         min = n2;
        else
          min = n1;
  
        return min; 
     }
  
     // Return the max between two numbers
     public static double max(double n1, int n2)
     {
       double max;
         if (n1 &gt; n2)
          max = n1;
         else
           max = n2;
  
         return max;
      }
  
  
     //Returns the absolute value of the two numbers
     public static double abs(double n1)
     {
       if (n1 &lt; 0)
         return -n1;
       else 
         return n1;
  
     }
  
  
     public static double pow(double n1, int n2)
     {
       double f = 1;
           for (int i =0; i&lt; n2; i++)
             {
               f = f * n1;
             }
           return f;
  
     }
  
  
  }
  </code></pre>