课程: Level Up: Java
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Password complexity
- [Instructor] In order for a password to be secure enough, it must have a certain number of characters and special symbols. In this challenge, you'll create a function that verifies password complexity. In order for a password to be valid, it must have at least six characters, one uppercase letter, one lowercase letter and one number. The function will take in a string as input and output a Boolean, representing whether or not the password is complex enough. Taking a look at the codespace, your job is to implement isPasswordComplex. You can run this code locally and test manually with different inputs. Or you can run the automated tests in the associated test file. Good luck. (upbeat music) There are lots of different solutions to this challenge, and we'll walk through two. The first solution will use some of the built-in methods in Java's character class to see if the password complexity requirements are met.…