Question
Write a java program that prompts the user to create a new password with at least one uppercase letter, one lowercase letter, and one digit.
Write a java program that prompts the user to create a new password with at least one uppercase letter, one lowercase letter, and one digit. The password must have a length of 5. If the password violates on of these rules, tell the user which error has occurred. If the password is good, display a message that the password has been changed.
Sample run:
Enter your new password: xnyp8 Your password should contain one uppercase letter.
Enter your new password: treaT Your password should contain one digit.
Enter your new password: mX4dt Your password has been changed.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started