Search:

Type: Posts; User: Norm

Search: Search took 0.10 seconds.

  1. Replies
    7
    Views
    1,088

    Re: How to use a Random object here?

    rand() is a method not a variable. What is the definition for the rand() method?

    Are you asking how to change what the rand() method returns every time it is called?
    You'll have to post the...
  2. Replies
    7
    Views
    1,088

    Re: How to use a Random object here?

    I don't know what the code you are posting does because its not all there.


    Is this what you are trying to do: Assign a random value in the range 0 to 2 to the variable: loop?
    The Random class...
  3. Replies
    7
    Views
    1,088

    Re: How to use a Random object here?

    See the Random class for methods to do that. To work out the technique write a short program that calls the Random class's method repeatedly (in a loop) and prints out the results.
  4. Replies
    7
    Views
    1,088

    Re: How to use a Random object here?

    Can you explain what the current code does and give some examples and explain what you want it to do differently.

    No way to understand what the code is doing without definitions and current...
Results 1 to 4 of 4