Aliensbrain
  • Home
  • Topics
  • Quizzes
  • Notebooks
  • Community
  • Sign in
  • programming languages Online Quiz - 43
  • What is the output for the below code ? import java.util.r...

What is the output for the below code ? import java.util.regex.Matcher; import java.util.regex.Pattern; public class Test { public static void main(String... args) { Pattern p = Pattern.compile("a*b"); Matcher m = p.matcher("b"); boolean b = m.matches(); System.out.println(b); } }

technology programming languages
  1. true

  2. compile error

  3. false

  4. b


Show answer
Correct Option: A

Find more quizzes:

© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy