Search:

Type: Posts; User: cfmonster

Search: Search took 0.60 seconds.

  1. Replies
    3
    Views
    8,632

    Re: Returning Random Strings from an Array

    I took your suggestion of:

    Random gen = new Random();
    // since we can access arrays via index, let's generate some random numbers for the indices
    suit =...
  2. Replies
    3
    Views
    8,632

    Returning Random Strings from an Array

    I'm trying to construct a class named Card that will eventually deal and print a certain number of cards.

    I'm having trouble generating random strings from two arrays called suitArray and...
  3. Replies
    5
    Views
    1,641

    [SOLVED] Re: loop , passed and failed

    It sounds like you need a variable to store the number of passing grades in. When the loop is over, you can then put that variable into your conditionals.

    Edit: Because you are always entering...
  4. Replies
    7
    Views
    10,111

    Re: User Input Loop

    The "-1" in this example is being read as a String.

    Double quotes are for string representation, while single quotes are for character representation.
  5. Re: Formatting Output

    Thanks. Slowly but surely getting the hang of Java again :)
  6. Program of creating and printing a random phone number that takes only 8-9 in first three digits

    I am going through a Lewis and Loftus book doing all of the examples, trying to get myself reacquainted with the Java language. I've included the exercise's requirements inside of the
    tags.
    ...
  7. Replies
    7
    Views
    10,111

    Re: User Input Loop

    Thanks. I hadn't realized that there was a built in method for string comparison.
  8. Replies
    7
    Views
    10,111

    User Input Loop

    I've been messing around with this for a bit and cannot seem to code it so that it will work as intended. I'm trying to prompt the user for input repeatedly, until the user enters a -1, when the loop...
Results 1 to 8 of 8