title: Prompt user to enter input using Scanner
body: <p>I am trying to accept 4 integer values, 4 float values, and 3 characters in the order listed below. I am having trouble accepting characters and keep running into errors no matter what I try and type in. I have tried both <code>char_value1 = charval.next();</code> and also this <code>char_value1 = charval.nextChar();</code> what am I doing wrong and how can I change this to work correctly?</p>
  
  <pre><code>import java.util.Scanner;
  
  
  public class calculations {
     public static void main(String[] args) {
  
          // Four integer values
          int int_value1;
          int int_value2;
          int int_value3;
          int int_value4;
  
          // Four double values
          double dbl_value1;
          double dbl_value2;
          double dbl_value3;
          double dbl_value4;
  
          // Three character values
          char char_value1;
          char char_value2;
          char char_value3;
  
         // Number value scanner here
         Scanner numval = new Scanner(System.in);
  
         // Prompt user to enter 4 integer values
         System.out.println("Enter 4 integer values below with a space in between");
  
         // 4 integer values set in order as they were entered
         int_value1 = numval.nextInt();
         int_value2 = numval.nextInt();
         int_value3 = numval.nextInt();
         int_value4 = numval.nextInt();
  
         // Prompt user to enter 4 float values
         System.out.println("\nEnter 4 floating values below with a space in between");
  
         // 4 float values set in order as they were entered
         dbl_value1 = numval.nextDouble();
         dbl_value2 = numval.nextDouble();
         dbl_value3 = numval.nextDouble();
         dbl_value4 = numval.nextDouble();
  
         numval.close();
  
         // Character value scanner here
         Scanner charval = new Scanner(System.in);
  
         System.out.println("\nEnter any 3 characters below with a space in between");
  
         char_value1 = charval.nextChar();
         char_value2 = charval.nextChar();
         char_value3 = charval.nextChar();
  
         charval.close();
  </code></pre>