title: Java: public static newInstance()
body: <p>Can someone explain what this piece of code does. For example, what's the second declaration do? i.e. <code>public static AlertDialogFragment newInstance()</code> here:</p>
  
  <pre><code>public static class AlertDialogFragment extends DialogFragment {
  
      public static AlertDialogFragment newInstance() {
          return new AlertDialogFragment();
      }
  </code></pre>