为什么会出现这样的报错,求解决


public void setterto() {
      System.out.println("Enter the numble of OriginEmployee\n");
      Scanner in = new Scanner(System.in);
      int n;
      n = in.nextInt();
      countTotal = countTem + n;
      System.out.println("Enter the name,departure,workinghours and salaryperhour(with 'enter'):\n");
      String[] str = new String[3];
      for (int i = 0; i < n; i++) {
         for (int j = 0; j < 2; j++) {
            str[j] = in.nextLine();
         }
         double hour = in.nextDouble();
         double salartperhour = in.nextDouble();
         addFirstt (str[0], str[1], hour,salartperhour);
         System.out.println("Enter the name,departure,workinghours and salaryperhour(with 'enter'):\n");
      }

   }

img

img

输入跟接收值类型不一致呗,in.nextDouble()只能接收数字类型的,怎么能输入字符呢,字符可以直接使用in.next()或者in.nextString()