I'm trying to create a loop of 50 characters and then return the whole 50 characters as a String, but unfortunately the String is only returning the last letter, and not all 50 characters. getRandomUpperChar() is just a method I created to get a random Uppercase char value from 'A' to 'Z'.
public static String initializeKey(int num , int minNum, int maxNum) {
String random = "";
for(int j = 0; j <num; j++) {
getRandomUpperChar();
char Xp = getRandomUpperChar(minNum, maxNum);
random = "" + Xp;
System.out.print(random);
}
return random;
}
getRandomUpperChar()with no args doing on line 4? Is your method overloaded? If so, what does the no-arg method do?