• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Identify the name of the design pattern being used

 
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am new to design patterns. I did not find any group where I can post this question of mine.

I have just read the book of design patterns and I am looking for real examples of design patterns being used by JAVA.

here goes my question, which design pattern is being used when we implement the Runnable interface.




I guess this must be Strategy design pattern. Because, we have encapsulated what varies and this is done in Strategy design pattern.

Here the behavior of the run method varies..and that we can change dynamically by passing the corresponding object to the constructor of thread class.

Someone please confirm that my understanding is correct.


I am really keen to see real examples of design patterns being used by JAVA. It'll be great if someone can refer me some web-link where such real examples are posted. I am planning to post these examples on my blog http://javakafunda.blogspot.com sooner or later.... So that people can learn from it...


 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic