Java tutorial
import java.util.Calendar; public class Main { public static void main(String[] args) { Calendar cal = Calendar.getInstance(); boolean b = cal.isSet(Calendar.DAY_OF_MONTH); System.out.println("Day of month is set: " + b); // clear day of month cal.clear(Calendar.DAY_OF_MONTH); // determine if the given calendar field has a value set b = cal.isSet(Calendar.DAY_OF_MONTH); System.out.println("Day of month is set: " + b); } }