title: Purpose of Default or Defender methods in Java 8
body: <p>Java 8 has included a new feature called <a href="http://java.dzone.com/articles/introduction-default-methods" rel="nofollow noreferrer">Defender methods</a> which allows creation of default method implementation in interface.</p>
  <p>Now first of all this is a huge paradigm shift for all condensed programmers in Java. I viewed  a JavaOne 13 presentation given by Brian Goetz where he was discussing about the new <code>stream()</code> and <code>parallelStream()</code> implementations in Collections library.</p>
  <p>For adding new methods in <code>Collection</code> interface, they could not have just added a new method without breaking the previous versions. So he told that for catering this a new feature of Default methods was added.</p>
  <pre><code>public interface SimpleInterface {
    public void doSomeWork();
     
    //A default method in the interface created using &quot;default&quot; keyword
    default public void doSomeOtherWork(){
      System.out.println(&quot;DoSomeOtherWork implementation in the interface&quot;);
    }
  }
  </code></pre>
  <p>Now my question is basically that are default methods just helpful when needed to add new methods to interface without breaking client code? Or are there some other uses to it too?</p>