title: DRY principle in Java
body: <p>I have been reading about the <a href="https://en.wikipedia.org/wiki/Don%27t_repeat_yourself" rel="nofollow noreferrer">DRY</a> principle. Though it seems so easy, I am having difficulty in understanding how we actually achieve it in any project, be it a web application or <a href="https://en.wikipedia.org/wiki/Swing_%28Java%29" rel="nofollow noreferrer">Swing</a>.</p>
  <p>Maybe a few examples will give me a lead and help me in developing my thought process.</p>
  <p>I have tried to search on Google, but I could not find anything suitable.</p>