Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Examples of Design Patterns used in JDK [duplicate]

Tags:

Possible Duplicate:
Examples of GoF Design Patterns

At an interview a while back I was asked for some examples of Design Patterns within the JDK.

Off the top of my head I was able to identify

Flyweight - as used in the String pool Singleton - in java.lang.Runtime Iterator - as used on Collections classes

Not that many.

What are the other good examples of Design Patterns as used in the JDK?

like image 902
Pram Avatar asked Sep 06 '10 07:09

Pram


1 Answers

Observer interfaces, you have them out-of-the-box.

For a complete answer, read this: Examples of GoF Design Patterns in Java's core libraries

like image 54
pakore Avatar answered Oct 05 '22 23:10

pakore