RMI is based on Proxy.
Should be possible to cite one for most of the 23 patterns in GoF:
- Abstract Factory: java.sql interfaces all get their concrete implementations from JDBC JAR when driver is registered.
- Builder: java.lang.StringBuilder.
- Factory Method: XML factories, among others.
- Prototype: Maybe clone(), but I'm not sure I'm buying that.
- Singleton: java.lang.System
- Adapter: Adapter classes in java.awt.event, e.g., WindowAdapter.
- Bridge: Collection classes in java.util. List implemented by ArrayList.
- Composite: java.awt. java.awt.Component + java.awt.Container
- Decorator: All over the java.io package.
- Facade: ExternalContext behaves as a facade for performing cookie, session scope and similar operations.
- Flyweight: Integer, Character, etc.
- Proxy: java.rmi package
- Chain of Responsibility: Servlet filters
- Command: Swing menu items
- Interpreter: No directly in JDK, but JavaCC certainly uses this.
- Iterator: java.util.Iterator interface; can't be clearer than that.
- Mediator: JMS?
- Memento:
- Observer: java.util.Observer/Observable (badly done, though)
- State:
- Strategy:
- Template:
- Visitor:
I can't think of examples in Java for 10 out of the 23, but I'll see if I can do better tomorrow. That's what edit is for.