What exactly is happening in the piece of code with the newInstance() method being used statically?
<p>I understand mostly everything in this code, except when newIstance() is being used. Could anyone please explain. Much appreciated.</p>

<pre><code>public class DateDialogFragment extends DialogFragment {

public static String TAG = "DateDialogFragment";

static Context sContext;
static Calendar sDate;
static DateDialogFragmentListener sListener;

public static DateDialogFragment newInstance(Context context, int titleResource, Calendar date){
    DateDialogFragment dialog  = new DateDialogFragment();

sContext = context;
    sDate = date;

Bundle args = new Bundle();
args.putInt("title", titleResource);
dialog.setArguments(args);
return dialog;
   }
}
</code></pre>

<p>I made an edit, I guess its working differently when its static. I assume thats why I am confused. How is the method changed when its static? I don't really see why not do it in the constructor?</p>
