Title: Generate Password in Java
Question: GeneratePassword.java
Write a program that generates a password based on the number of digits provided by the user. The digits can be used again in the password, as shown in the example below (7 was generated twice).
Important requirement: Write a separate method called randomGenerator that will handle the random number generation. This means that the main method will not be responsible for generating the numbers.
Sample output:
How many digits would you like to use for a numeric password?
5
Your password is 7597