How to Declare a Dialog object

DatePickerDialag was added in API Level 1
A base class for Dialogs.
This will declare a Dialog object.

1. Add the import below to the import section of the MainActivity.java file.

import android.app.Dialog;

2. Add the below line to the onCreate method.

Dialog myDialog;

3. Compile and run!

Next Recommended Article: How to Create an AlertDialog with Supplied Arguments

Resources:
http://developer.android.com/reference/android/app/Dialog.html