Declaring a Double in Java
<pre><code>import java.util.Scanner;
class Calculator
{


    public static void main(String args[]){
        Scanner mortgage = new Scanner(System.in);
        System.out.println(mortgage.nextLine());
        double iRate;
        double lAmount;
        double answer;
        System.out.println("Enter interest rate");
        iRate = mortgage.nextDouble();
        System.out.println("Enter loan amount");
        lAmount = mortgage.nextDouble();
        answer = iRate + lAmount;
        System.out.println(answer);
    }

}
</code></pre>

<p>My question is I don't think I am declaring the doubloe correctly and am getting an error. How do I declare the double correctly so the program runs without error</p>
