Question 1
What is displayed by the following code?
System.out.print("Hi, ABC, good".matches("ABC ") + " ");
System.out.println("Hi, ABC, good".matches(".*ABC.*"));
◦ true true
◦ true false
◦ false false
◦ false true
Question 2
What is displayed by the following code?
System.out.print("A,B;C".replaceAll(",;", "#") + " ");
System.out.println("A,B;C".replaceAll("[,;]", "#"));
◦ A#B#C A#B#C
◦ A B C A B C
◦ A,B;C A#B#C
◦ A B C A#B#C