Search:

Type: Posts; User: KevinWorkman

Search: Search took 0.08 seconds.

  1. Replies
    11
    Views
    1,513

    Re: display the generated Math.random number

    Converting it to a char should round it down for you...
  2. Replies
    11
    Views
    1,513

    Re: display the generated Math.random number

    Almost. You multiply it by whatever you want your maximum (non-inclusive) to be. If you want a char, check out the upper bounds for them.

    Also, don't be afraid to try these things before you ask....
  3. Replies
    11
    Views
    1,513

    Re: display the generated Math.random number

    Yeah. It's available towards the bottom of this page: Java SE Downloads
  4. Replies
    11
    Views
    1,513

    Re: display the generated Math.random number

    That depends on what you want it to do. Recommended reading: The for Statement (The Java™ Tutorials > Learning the Java Language > Language Basics)



    You tell me. What does the API say? It is...
  5. Replies
    11
    Views
    1,513

    Re: display the generated Math.random number

    I'm still really not positive what you mean, but you could either create a method that calls it for you, or you could look into the Random class.

    But now that I'm looking at your code a little...
  6. Replies
    11
    Views
    1,513

    Re: display the generated Math.random number

    I'm not sure what you mean by "another method that i may use to display that value". Do you mean in a GUI? Something else?
Results 1 to 6 of 6