Search:

Type: Posts; User: Norm

Search: Search took 0.11 seconds.

  1. Replies
    14
    Views
    2,010

    [SOLVED] Re: How do I make my program accept letters?

    What program? You did not post the program's the current code.
    The compiler has options about version levels that could allow you to generate a version of a class file that is executable with a 1.5...
  2. Replies
    14
    Views
    2,010

    [SOLVED] Re: How do I make my program accept letters?

    I take it you are using jdk 1.7
    You seem to have forgotten to tell anyone.
  3. Replies
    14
    Views
    2,010

    [SOLVED] Re: How do I make my program accept letters?

    The problem with nextInt() is it won't like you typing in letters. It wants numeric characters 0-9.
    Not many users know the ASCII codes for the letters.

    To get a char, I think you'll need to read...
  4. Replies
    14
    Views
    2,010

    [SOLVED] Re: How do I make my program accept letters?

    What did you type in? What is valid input for the nextShort() method?
    Why does the nextShort method throw that exception?

    Read the API doc for the Scanner class's nextShort method.
  5. Replies
    14
    Views
    2,010

    [SOLVED] Re: How do I make my program accept letters?

    The simple answer is: You write a program.
    You read it in
    You test it
    You put out an answer depending on the test.

    You could use a switch statement, but I think you'd have to have 26 case...
  6. Replies
    14
    Views
    2,010

    [SOLVED] Re: How do I make my program accept letters?

    What are the conditions you need to test that need to be true?
    You have read a single character
    the character is in the range: a-z and A-Z?

    The String class has a method to determine the number...
Results 1 to 6 of 6