AlertDialog.Builder performs attribute settings such as setTitle() or setMessage() and is not displayed to the user.
AlertDialog is one that displays the attributes that were set in AlertDialog.Builder .
The goal of having as mentioned somewhere, is that it allows you to set the settings separately from the actual display, which, in turn, makes a convenient thing.
source share