Results 1 to 2 of 2

Thread: completely new

  1. #1
    battosai16 is offline Member
    Join Date
    Aug 2010
    Posts
    2
    Rep Power
    0

    Default completely new

    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."
    -- Socrates
     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."
    --Carl Sagan.
     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."
    --Thomas Edison
     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!

  2. #2
    Zack's Avatar
    Zack is offline Senior Member
    Join Date
    Jun 2010
    Location
    Destiny Islands
    Posts
    692
    Rep Power
    4

    Default

    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.

Similar Threads

  1. wait until directory is completely deleted
    By nickvandewiele in forum New To Java
    Replies: 1
    Last Post: 03-26-2010, 01:08 PM
  2. Is JAVA completely object-oriented???
    By venkateshk in forum New To Java
    Replies: 2
    Last Post: 11-17-2008, 09:17 AM
  3. Completely new to Java problem
    By Seamo14 in forum New To Java
    Replies: 4
    Last Post: 10-09-2008, 12:50 PM
  4. Files not completely deleted on Linux
    By amamare in forum Advanced Java
    Replies: 0
    Last Post: 12-19-2007, 02:12 PM
  5. I am completely stuck
    By jpnym15 in forum New To Java
    Replies: 2
    Last Post: 11-14-2007, 06:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •