+ 2
Have you got to the chapter about arrays? cause my idea involves the use of an array.
Here's my idea in brief:
1. Create a String array with 3 slots reserved.
2. Read 3 String input for age, name and address, and store them into the 1st, 2nd and 3rd slot respectively, in the array.
3. Use Random class to generate a number between 0 ~ 2, and use the generated number to refer to a random item (by index) from the array.
https://www.javatpoint.com/how-to-generate-random-number-in-java
0
Random string? you mean choose a random index from an array of string?
Is this about Java or Javascript? there are difference between the two ...
0
Describe more about the task, still unclear what was expected.
0
So you ask user how old they are, their name and address; and you want to choose either the age, name or address randomly???
0
Okay and good luck! đ