1. Explain the difference between default validation and required validation. 2. What is the syntax for declaring a character class in a regular expression. 3. Create a character class for all the vowels (upper and lower case). 4. List the predefined character classes. 5. How can a special character like . or \ be used as a normal character in a regular expression? 6. Write a regular expression that matches the Windows path \cgs4854\ch5. 7. What is the symbol for alternation? 8. Write the regular expression that matches the colors red, green or blue. 9. What is the syntax for grouping parts of a regular expression, without remembering what is matched? 10. What is the syntax for grouping parts of a regular expression that remembers what is matched? 11. What does (\d)(\w)\2\1 match? 12. What is the syntax for ignoring the case in a regular expression? 13. What is the syntax for matching from 3 to 7 occurrences of a pattern? 14. What is the syntax for matching exactly 5 occurrences of a pattern? 15. WHat is the syntax for matching 4 or more occurrences of a pattern? 16. What is the special symbol that matches 0 or more occurrences of a pattern? 17. What is the special symbol that matches 1 or more occurrences of a pattern? 18. What is the special symbol that matches 0 or 1 occurrences of a pattern? 19. What does the regular expression \d{3} match? 20. What does the regular expression (-?)\d{2}\1 match? 21. What does the regular expression [a-zA-Z]{3,5} match? 22. Which methods should be annotated for required validation? 23. Is there a limit to the number of annotations that can be placed on a method? 24. True|False: The NotNull annotation should only be used on methods that return objects. 25. What is the default message for the NotNull annotation? 26. What should be the return type for all methods that are annotated with Pattern? 27. What is the name of the required parameter for the Pattern annotation? 28. What is the default message for the Pattern annotation? 29. Does the regular expression in the Pattern annotation match the entire string or a substring? 30. What does .* mean when added to a regular expression? 31. What are the names of three annotations that can be used on methods that return numbers? 32. Should the NotNull annotation be used on methods that return numbers? 33. Should the Pattern annotation be used on methods that return numbers? 34. What does the pattern .*\S.* match? 35. Why is the expression .*\S.* written as .*\\S.* in Java? 36. BeanUtils can parse integers automatically. How does the programmer indicate that a property should hold an integer? 37. Why are the Validator and ValidatorFactory member variables added as static members to the HelperBase class? 38. What is the name of the Hibernate method that validates the bean? What does it return? 39. What is a Java Map? How is something retrieved from a Map? 40. Construct a Map that is indexed by Strings and contains Strings. 41. Summarize the two major things that setErrors method does. 42. Summarize what the isValid method does. 43. Summarize what the getErrors method does. 44. Summarize what the clearErrors method does. 45. When should required validation be done? 46. Write the code that performs required validation. If the data is valid, go to Good.jsp. If the data is bad, go to Bad.jsp. 47. What is the EL for retrieving the error message for hobby?