+ 2

What is the output &how it produces that output?

https://code.sololearn.com/c996BiWv14jo/?ref=app

6th Sep 2019, 1:34 AM
Lalitha
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~
6th Sep 2019, 1:42 AM
Uchiha Itachi
Uchiha Itachi - avatar
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
6th Sep 2019, 3:01 AM
zemiak