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 =...
Type: Posts; User: cfmonster
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 =...
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...
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...
The "-1" in this example is being read as a String.
Double quotes are for string representation, while single quotes are for character representation.
Thanks. Slowly but surely getting the hang of Java again :)
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.
...
Thanks. I hadn't realized that there was a built in method for string comparison.
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...