publicstaticvoid main(String args[]) {
GregorianCalendar cal = new GregorianCalendar();
cal.clear();
cal.set(YEAR, 2003); long t = cal.getTime().getTime();
// For the time calculation, the MONTH and DAY_OF_MONTH fields // (with the default values) have been used for determining // the date. However, both the MONTH and DAY_OF_MONTH fields // should be kept UNSET after the time calculation. if (cal.isSet(MONTH) || cal.isSet(DAY_OF_MONTH)) { thrownew RuntimeException("After getTime(): MONTH field=" + cal.isSet(MONTH)
+ ", DAY_OF_MONTH field=" + cal.isSet(DAY_OF_MONTH));
}
// After calling get() for any field, all field values are // recalculated and their field states are set to // COMPUTED. isSet() must return true. int y = cal.get(YEAR); if (!(cal.isSet(MONTH) && cal.isSet(DAY_OF_MONTH))) { thrownew RuntimeException("After get(): MONTH field=" + cal.isSet(MONTH)
+ ", DAY_OF_MONTH field=" + cal.isSet(DAY_OF_MONTH));
}
}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.1 Sekunden
(vorverarbeitet am 2026-06-10)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.