8 Replies Latest reply: Mar 20, 2007 8:43 AM by 807606 RSS

    Can't input for text, only for numbers

    807606
      A program I have written has inputs for text and numbers, the text one just comes up and then skips to the input of numbers.

      double age, score
      String name;

      System.out.println ("Age: ");
      age = console.nextDouble();

      System.out.println("Name: ");
      message = console.nextLine();

      System.out.println ("Score: ");
      score = console.nextDouble();

      It justs runs like this

      Age:
      17
      Name
      Score:
      23

      Doesn't let me input anything for text.