How to Declare a Calendar object

Calendar was added in API Level 1

1. In the MainActivity.java file, add the below line to the imports section.

import java.util.Calendar;

2. Add the below line to the onCreate method to declare a Calendar object.

 Calendar myCalendar;

3. Compile and run!

Next Recommended Article: getInstance() - How to Get Current Date/Time and Save to Calendar object

Resources:
http://developer.android.com/reference/java/util/Calendar.html