Search:

Type: Posts; User: TCDave

Search: Search took 0.29 seconds.

  1. Replies
    6
    Views
    275

    Re: Creating an array from a string

    Ok, I see that the problem is that my variable number is not being created the way I intended.

    I put a system.out.print in the intParse() method in the if statement and else statement. Depending...
  2. Replies
    6
    Views
    275

    Re: Creating an array from a string

    Exception in thread "main" java.lang.NumberFormatException: For input string: ""
    at java.lang.NumberFormatException.forInputString(Unknown Source)
    at java.lang.Integer.parseInt(Unknown Source)...
  3. Replies
    6
    Views
    275

    Creating an array from a string

    I am having trouble taking a String type of data, extracting information from it, and then putting that information into an array. I have to extract the integers from the string while ignoring all...
  4. [SOLVED] Re: Trying to compare an int variable to an index in an array

    Sorry about that. Here is the full error message:

    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 61
    at Program08.main(Program08.java:19)

    Thanks for the advise. It took...
  5. [SOLVED] Trying to compare an int variable to an index in an array

    I have a method that is called that returns the value of 2 dice rolls, one for the computer and one for the player.

    I have an array that has all the possible values of dice rolls.

    I want to...
  6. Replies
    3
    Views
    306

    Re: Prints an extra character for this game.

    Oh, the 35 is nothing significant. I was planning to replace that with a boolean to end the program when no more question marks were printed.

    I am reading an entire line with Scanner's...
  7. Replies
    3
    Views
    306

    Prints an extra character for this game.

    This program is supposed to work like hangman. My code is inputting extra '?' even after a user makes a correct guess. How do I correct this? I want to use the for loops that already exist and I...
Results 1 to 7 of 7