public class Programming {
public static void main(String[] args) {
// Scanner scan = new Scanner( System.in );
int l = 0;
StringBuilder password = new StringBuilder();
l = password.length();
for (l = 1; l < 100; l++) {
if (l > 0 || l < 100) {
System.out.println("Your password has the correct length");
}
}
if (l < 0 || l > 100) {
System.out.println("Your password does NOT have the correct length");
}
for (int i = 0; i < 127; i++) {
}
}
}
I was wondering how I could run a loop to figure out the first character generated by the PasswordGenerator class. Documentation here but each character is only a standard ASCII code between 0-127, after that I must append each character to make it into a String. The length of the password is between 0 and 100(above).
You don’t need a loop.
Once you figure out how to call the password generator class to get a value in your password string, just use the following code to get the first character.