Created
February 15, 2021 13:43
-
-
Save abircse/967e5082ec16a3daad25ed45ce67164e to your computer and use it in GitHub Desktop.
RandomCodeGeneratorInString
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object RandomCodeGen { | |
fun generate(): String { | |
val rnd = Random() | |
val number = rnd.nextInt(999999) | |
return String.format("%06d", number) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment