Ruby | Random new_seed() function
Last Updated :
17 Dec, 2019
Random#new_seed() : new_seed() is a Random class method which returns a random seed value.
Syntax: Random.new_seed()
Parameter: Random values
Return: a random seed value
Example #1 :
date_a = Random.new_seed()
puts "Random new_seed form : #{date_a}\n\n"
|
Output :
Random new_seed form : 136900168362527727761982174954109934532
Example #2 :
date_b = Random.new_seed()
puts "Random new_seed form : #{date_b}\n\n"
|
Output :
Random new_seed form : 271255499858368204233299869842415724010
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...