The Artima Developer Community
Sponsored Link

Java Buzz Forum
Decorator Design Pattern in Java - Real life Example

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Javin Paul

Posts: 1090
Nickname: javinpaul
Registered: Jan, 2012

Javin Paul is Java Programmer working on Finance domain.
Decorator Design Pattern in Java - Real life Example Posted: Jul 16, 2013 5:56 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Javin Paul.
Original Post: Decorator Design Pattern in Java - Real life Example
Feed Title: Java67
Feed URL: http://www.java67.com/feeds/posts/default?alt=rss
Feed Description: Java and technology tutorials, tips, questions for all programmers.
Latest Java Buzz Posts
Latest Java Buzz Posts by Javin Paul
Latest Posts From Java67

Advertisement
Decorator Pattern is one of the famous Gang of Four (GOF) structural design pattern, which provides an alternative way  of extending an object's functionality. It's different than traditional way of adding new functionality into object using Inheritance, since it's based on Composition and provides additional functionality at runtime, as opposite to Inheritance, which adds new functionalities at compile time. Decorator design pattern is introduced by famous Gang of Four design pattern book, almost 2 decades ago. It's a time tested way of adding new functionalities into object. In this Java design pattern tutorial, we will learn Decorator design pattern by using it in a Java example. This is a best way of learning design pattern, followed you try it yourself to apply in similar scenarios. Decorator pattern is one of the popular design pattern along with Factory method pattern and Singleton Pattern, and you can see it's usage even in JDK itself. Couple of classes from java.io package e.g. BufferedInputStream, LineNumberInputStream are good example of Decorator design pattern in Java.
Read more »

Read: Decorator Design Pattern in Java - Real life Example

Topic: Deploying artifacts to Maven central repo Previous Topic   Next Topic Topic: People seem to be buying Chromebos

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use