Java Pattern asPredicate() MethodThe asPredicate() method of Java Pattern class is used to create a predicate which can be used to match a string. This method is introduced in JDK 1.8. Syntax:ReturnsThis method returns the predicate which can be used for matching on a string Example 1Test it NowOutput: Example 2Test it NowOutput: true false Example 3Test it NowOutput: true asPredicate Hash code 8039463 Pattern Hash code 3849352
Next TopicJava Pattern
|