title: Exception in thread "main" java.util.InputMismatchException error
body: <p>I believe I wrote all my code correctly but Im getting this error, can someone help me understand:</p>
  
  <pre><code>Exception in thread "main" java.util.InputMismatchException
  at java.base/java.util.Scanner.throwFor(Scanner.java:939)
  at java.base/java.util.Scanner.next(Scanner.java:1594)
  at java.base/java.util.Scanner.nextDouble(Scanner.java:2564)
  at gangPackage.newClass.main(newClass.java:15)
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code>package gangPackage;
  import java.util.*;
  public class newClass {
      public static void main (String[] args) {
          Scanner Scan = new Scanner(System.in);
          String name;
          int age;
          double gpa;
  
          System.out.println("Enter your name: ");
          name = Scan.nextLine();
          System.out.println("Enter students age: ");
          age = Scan.nextInt();
          System.out.println("Enter your GPA: ");
          gpa = Scan.nextDouble();
  
  
          System.out.printf(name + " is " + age + " years old. And has a GPA of " + gpa);
      }
  }
  </code></pre>