Java Arena

Module 39

StringBuilder, regular expressions, enums and iterators

The tools that round off part 10. The traditional for loop once more, for counting down, taking steps and working with indexes; StringBuilder, for building a text piece by piece; regular expressions, which check the form of a string with matches, alternation, groups, quantifiers and character classes; enums, types with a fixed set of values, with fields, a constructor and methods of their own; and iterators, which can remove elements while going through a collection. Last, a look back at the whole of part 10. MOOC sections 10.3 and 10.4.

Steps

  1. The for loop again
  2. StringBuilder: building a text piece by piece
  3. Regular expressions: matches, | and groups
  4. Quantifiers and character classes
  5. Enums: a fixed set of values
  6. Enums with fields, a constructor and methods
  7. Iterators: removing while going through
  8. Putting it together, and the end of part 10