+ 2
What is the output &how it produces that output?
2 Respostas
+ 1
There only have two outputs which is true or false.
matches is used to check the string whether it include the same characters or not.
If it is same, output will be true.
If it is not same, output will be false
Here the definition,
https://www.tutorialspoint.com/java/java_string_matches.htm
Good Luck~
0
String is an Object, has some methods, so you can run
"some string".matches(...)
matches uses regular expresion (regex) where
.* mean any characters or not, so
".*ABC.*" mean ABC inside string
if there is ABC inside string it return true