• Post Reply Bookmark Topic Watch Topic
  • New Topic

Identify the name of the design pattern being used  RSS feed

 
Yogesh Gandhi
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • 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...


 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!