Java Design Patterns Interview Questions and Answers
Question: Can you name few design patterns used in standard JDK library?Answer: Decorator design pattern which is used in various Java IO classes, Singleton pattern which is used in Runtime , Calendar and various other classes, Factory pattern which is used along with various Immutable classes likes Boolean e.g. Boolean.valueOf and Observer pattern which is used in Swing and many event listener frameworks. |
Is it helpful?
Yes
No
Most helpful rated by users:
- What is design patterns?
- Can you name few design patterns used in standard JDK library?
- What is Singleton design pattern in Java ? write code for thread-safe singleton in Java.
- What is main benefit of using factory pattern? Where do you use it?
- What is observer design pattern in Java?