Question: Write a method that takes a String as a parameter and prints to the screen which of the regular expressions shown below is satisfied by
Write a method that takes a String as a parameter and prints to the screen which of the regular expressions shown below is satisfied by the String. The String can only contain the characters a and b and you must use the .matches(<...>) method with a regular expression. The method doesn't have to return anything.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
