The complete () method in the Calendar class performs the following operations:
protected void complete()
Fills in any undefined fields in the calendar fields. First, the computeTime () method is called if the time value (millisecond offset from the Age) is not calculated from the values of the calendar field. Then the computeFields () method is called to calculate the entire calendar of the field value.
The complete () method has the following code:
protected void complete()
{
if (!isTimeSet)
updateTime();
if (!areFieldsSet || !areAllFieldsSet) {
computeFields();
areAllFieldsSet = areFieldsSet = true;
}
}
My question is what is the essence of this round work? First values from
protected int[] fields
used to update values
long time
using the computeTime () method. And then the time valve is used to update the values in the fields using computeFields (). The value both in time and in the field will be synchronized after calling the computeTime () method, right? or am I missing something here?
, , , , , , , getTime() ( )!!