title: How to import double values to console through Scanner
body: <p>whenever i input a double value like 5.9 for either a, b, or c i get a missmatch exception error. my goal is to create a quadratic function by importing values for a, b and c with the Scanner.</p>
  <pre><code>import java.util.Scanner;
  public class Main {
      static Scanner scan = new Scanner(System.in);
      public static void main(String[] args) {
          Wrappers.quadraticWrapper(scan);
  
      }
      static class Wrappers {
          public static void quadraticWrapper(Scanner s){
              System.out.print(&quot;Insert for a: &quot;);
              double a = s.nextDouble();
              System.out.print(&quot;insert for b: &quot;);
              double b = s.nextDouble();
              System.out.print(&quot;insert for c: &quot;);
              double c = s.nextDouble();
              printArr(Formulas.quadraticF(a, b, c));
          }
          private static void printArr(double[] arr) {
              System.out.println(&quot;[&quot;);
              for (double d : arr) {
                  System.out.print(d + &quot; &quot;);
              }       System.out.println(&quot;]&quot;);
  
          }
      }
      static class Formulas{
          public static double[] quadraticF(double a, double b, double c) {
              double[] arr = new double[2];
              double x1, x2;
              x1 = (-b + Math.sqrt(Math.pow(b, 2) - ((4) * (a) * (c))))/(2 * a);
              x2 = (-b - Math.sqrt(Math.pow(b, 2) - ((4) * (a) * (c))))/(2 * a);
              arr[0] = x1;
              arr[1] = x2;
              return arr;
          }
      }
      
  
  }
  </code></pre>
  <p>Id appreciate your help! Thanks :D</p>