Why not
AlertDialogBuilder builder = new AlertDialogBuilder(this);
builder.setTitle("foo");
instead of
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle("foo");
Update: I want to know the reason behind this kind of writing/organization