Wrapper Class -- Creating a Password Help

Ask an user to type in a password, a qualified password should follow the constraints, such as:
Length of password >= 8
Include at least one uppercase character
Include at least one lowercase character
Include at least one integer
Include at least special character
Write a program to check if the user gives a qualified password.

I dont think should be using so many while statments, when i run and enter the characters im not getting the quilified password, help plz.

A very simple solution is to use regular expression with matches() method of String class. You may need to read about what it is. It is not difficult, and you should try to understand it. It will be very helpful to you in the future when you deal with String. Anyway, below is how you use it to simplify your program.

// Assume that the password string is in a variable named passwdStr
// Length of password >= 8
// You know how to check the string length, right?
//Include at least one uppercase character
if (!passwdStr.matches(".*[A-Z].*")) {
// the password string does NOT contain at least capital letter
}
//Include at least one lowercase character
if (!passwdStr.matches(".*[a-z].*")) {
// the password string does NOT contain at least one lower case letter
}
//Include at least one integer
if (!passwdStr.matches(".*\\d.*")) {
// the password string does NOT contain at least one digit number
}
//Include at least special character
// What are the list of special character???
// My guess here are !@#%_-*$^
if (!passwdStr.matches(".*[!@#%&_-\*\$\^].*")) {
// the password string does NOT contain at least one special character
}