Is there a way to have a program generate a random string and then create an int using that string? Maybe a random string generator defines String randomString;, then int [randomString]; where the letters generated become the name. For example, a random string generator defines String randomString = "abc"; and then int abc;. Then the generator defines randomString as randomString= "cba";, so it creates a second int int cba;. Or, maybe a bit simpler, the program executes randomString = keyboard.nextLine(); and the user enters 'fjdskla'. The program then takes that and does int fjdskla;, and is able to repeat this. Or, maybe this is not possible at all, in which case my hopes and dreams have been crushed. Any and all help is greatly appreciated regardless.
dimanche 18 octobre 2020
Is there a way for a program to create a new int dynamically?
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire