Saturday, 23 April 2016

Randomize Non-random (State) variable using randomize() method of Class



The randomize() method can be used to temporarily control the set of random and state variables within a class instance or object.
When randomize is called with arguments, those arguments designate the complete set of random variables within that object; all other variables in the object are considered state variables.
The randomize method accepts the special argument null to indicate no random variables for the duration of the call. In other words, all class members behave as state variables.
Consider following Example:
----------------------------------------------------
----------------------------------------------------

No comments:

Post a Comment