i have 2 problems one im trying to make a array using data that has both letter and number ex. 12321sdsd < but i get errors how can i fix that?
question 2 is wher do i begin on this problem i need
You do not need to use any keyboard I/O. Each time the code is ran, I will change the value of play to test your code. You do not need to use the keyboard.class as stated in the textbook.
If you want to use some of the example code above (How to get user input) to add keyboard input for this assignment that is fine but not required.
When play = 1 draw one blue circle on the right and display the following text below the circle on the left hand side:
"If all our misfortunes were laid in one common heap, whence everyone must take an equal portion, most people would be content to take their own and depart."
When play = 2 draw two green box's 40 pixels wide on the right and display the following text below the box's on the left hand side:
"There are only two ways to live your life. One is as though nothing is a miracle. The other is as though everything is a miracle."
-- Albert Einstein
When play = 3 draw three gray lines 70 pixels long on the right and display the following text below the lines on the left hand side:
"We are like butterflies who flutter for a day and think it's forever."
When the value of play is <= 100 but not 1, 2, or 3 display the following text on the left hand side:
"I haven't failed, I've found 10,000 ways that don't work."
When the value of play is > 100 and <= 1000 display the following text on the left hand side:
"Any science or technology which is sufficiently advanced is indistinguishable from magic."
--Arthur C. Clarke
When the value of play is >1000 display the following text on the left hand side:
Sorry, Value is out of Range!
If there are errors in your existing code, you need to post both the code and the exact error messages. My guess is, though, that you did not wrap it in quotes. (That is, 123abc is different from "123abc".)
For the second problem, it will be a series of if statements that detects the value of some variable play and then uses System.out.println() for the different lines depending on the value.