This program is as simple as it sounds; it automatically generates a random 6-digit output consisting of letters, numbers and special characters, making it an ideal way to randomize something such as a password! The program makes use of arrays to store all the potential characters, and methods that will discussed below.
randomizer(String[] arr) : Takes an array as a parameter, then returns a random element from the array using the Random class.
ordershuffle(String string) : Uses a string as a parameter and shuffles the characters using the Fisher-Yates shuffle algorithm.
generator() and generator1() : Both of these methods use the randomizer method and combine it's output into a password before using the ordershuffle method to shuffle the password characters' positions.
main(String[] args) : Finally, the main method prints the output by calling the generator methods before beginning a loop asking whether or not the user wants to generate another password or not.
Here is a brief overview on how the program works
Once the user runs the program, it immediately presents them with a random 6-digit string consisting of the aforementioned characters. Afterwards, the program also prompts the user to input Y or N, asking the user whether they want to generate a new string or not. If the user inputs anything else other than Y or N, the program will prompt them again until the user inputs a valid option like so.
If the user inputs N, the program will bid them goodbye and end the loop.