From one of our example, we have used the get(int field) in getting the value of any field of the Calendar object. This method will be your best friend in dealing with Calendar class since this method is versatile and would be able to set any calendar field base on the project requirement. The most practical to use is the first method which is set(int field, int value). Depending on our needs we can select which is suitable on our requirements. The set() method of Calendar class has 4 overloaded methods. The value used to set the SECOND calendar field. The value used to set the MINUTE calendar field. The value used to set the HOUR_OF_DAY calendar field. The value used to set the DAY_OF_MONTH calendar field. The value used to set the MONTH calendar field. The value used to set the YEAR calendar field. The value to be set for the given calendar field
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |