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...
Type: Posts; User: Norm
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...
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...
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.
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...