Examples of Design Patterns in Java