Password validator is a tool used in many applications. It is used to verify whether the password has met the required criteria or not. This helps many users in securing their privacy.
A password validator is a tool used to validate password standards to maintain security.
This program takes a string as input and checks whether the requirements or not.
There are several requirements for a password to be considered secure:
1. There must be at least 2 uppercase letters.
2. There must be at least 3 lowercase letters.
3. There must be at least one digit.
4. The Password length must be a minimum of 8 characters.
Then check for all the conditions by iterating each character of the string and check for the type of character there are several classes in this they are:
1. Upper Case: Character.isUpperCase()
2. Lower Case: Character.isLowerCase()
3. Digit: Character.isDigit()
4. Length: string.length
Finally, the password is considered valid by checking all the conditions if they are satisfied.
The output is:
()
Submitted by Avinash Battula (avinash1911)
Download packets of source code on Coders Packet
Comments