/* A) Prints the string "true" B) Prints the string "false" C) Throws NullPointerException D) None of the above */ public class Regular { public static void main(String[] args) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < 100; i++) { sb.append("a"); } System.out.println((sb + "c").matches("^(a|ab?)*$")); } }