how to create a random generated alphabet in Java
问题 Looking to create a randomly generated alphabet for a substitution cipher. My idea was something like this. char randomChar = (char) (97 + r.nextInt(25)); However this will cause repetition of letters. Going through the char array and seeing if the letter is already present seems inefficient also. edit: I was too vague in my request and see this now. Here is the full question I am trying to solve. The alphabet must also contain the space button character e.g ' '. Write a Java program which