How can I get a random number in Kotlin? by IT Nursery A generic method that can return a random integer between 2 parameters like ruby does with rand(0..n). Any suggestion? 23 Answers 23