课程: Java Algorithms
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Validate strings in Java: Specific properties
- [Instructor] Sometimes, we need to validate more specific properties on a given piece of data. For example, we might want to check if a string has at least one digit or at least one upper case letter. Validating specific properties can come in handy if we need to verify password complexity. Let's create an algorithm that validates this complexity. In other words, whether a string has at least one number, one uppercase letter, and one lowercase letter. We'll call it, is password complex. For the implementation, will iterate through the characters, s dot chars, but instead of using all match, we'll use the any match method. This will return true as long as any character in the string meets the inputted requirement. Our requirements are one upper case, one lower case and one number, let's add in those. We'll call any match with each requirement and then use the and operator to link them into a single expression. We'll return that from the function, we'll check is uppercase then at…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。
内容
-
-
-
Validate Strings in Java: All-or-nothing properties4 分钟 17 秒
-
(已锁定)
Validate strings in Java: Specific properties2 分钟 58 秒
-
(已锁定)
Normalize strings in Java4 分钟 38 秒
-
(已锁定)
Basic parsing and searching strings in Java3 分钟 39 秒
-
(已锁定)
Apply custom parsing to search algorithms3 分钟 24 秒
-
(已锁定)
Create algorithm-driven strings in Java3 分钟 46 秒
-
(已锁定)
Leverage built-in tools to generate custom data2 分钟 30 秒
-
(已锁定)
Solution: Reverse each word3 分钟 32 秒
-
-
-
-
-
-
-