Question: write exact Java code to solve the below problem as described: - Write a method that checks whether a string is a valid password. The

write exact Java code to solve the below problem as described: - Write a method that checks whether a string is a valid password. The method takes in a string and returns "true" if it stores a valid password and "false" otherwise. - Suppose the password rule is as follows: - it must start with two lowercase letters - it must contain at least one character in (@,$,%,&) - A password must have at least five letters. - A password must have at least two-numeric characters. Example: isValid("ab@1dcd2") true isValid("a@1dcd2") false isValid("a1dcd2") false isValid("a@1dcd") false
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
