subject

Having a secure password is a very important practice, when much of our information is stored online. Write a program that validates a new password, following these rules: The password must be at least 8 characters long. The password must have at least one uppercase and one lowercase letter The password must have at least one digit. Write a program that asks for a password, then asks again to confirm it. Next, write a method: public static void check(String pw1, String pw2) If the passwords donโ€™t match or the rules above are not fulfilled, print a message that the password is not valid. Here are some tips for checking the password: Use .equals() to compare two strings Use a loop to check each character of the password. In the loop, use Character. isDigit() to check if a character is a digit or not. Use Character. isUpperCase(nextChar) and Character. isLowerCase(nextChar) to check if a character is upper or lower case (where nextChar is the next current character in your password string). You could use flag variables to set if a digit, upper, and lowercase letter are found.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 15:10
David is in week 3 of his current ashford course and has a paper due by monday night at midnight. he has finished everything but the concluding paragraph. as he boots up his computer to work on it, he sees a flash across the screen and then the screen goes black. he begins to panic as he tries desperately to turn the laptop back on. david should have saved his work on what kind of portable device?
Answers: 2
question
Computers and Technology, 23.06.2019 02:30
People with high self-esteem: accept their strengths and weaknesses. believe that failed experiences are failures of their whole self. feel good about who they are only when they reach total success. need positive external experiences to counteract negative feelings that constantly plague them.
Answers: 1
question
Computers and Technology, 23.06.2019 04:31
Type the correct answer in the box. spell all words correctly. the managing director of a company sends a christmas greeting to all his employees through the company email. which type of network does he use? he uses an
Answers: 1
question
Computers and Technology, 24.06.2019 14:30
Which computer network component connects two different networks together and allows them to communicate? a is a node (or a device) that connects two different networks together and allows them to communicate.
Answers: 1
You know the right answer?
Having a secure password is a very important practice, when much of our information is stored online...
Questions
Questions on the website: 13722360