Java日历的getMinimalDaysInFirstWeek()方法和示例
Calendar类的getMinimalDaysInFirstWeek()方法 (Calendar Class getMinimalDaysInFirstWeek() method)
getMinimalDaysInFirstWeek() method is available in java.util package.
getMinimalDaysInFirstWeek()方法在java.util包中可用。
getMinimalDaysInFirstWeek() method is used to return the minimum days needed in the first week of the year.
getMinimalDaysInFirstWeek()方法用于返回一年中第一周所需的最少天数。
getMinimalDaysInFirstWeek() method is a non-static method, it is accessible with the class object and if we try to access the method with the class name then we will get an error.
getMinimalDaysInFirstWeek()方法是一个非静态方法,可通过类对象访问,如果尝试使用类名称访问该方法,则会收到错误消息。
getMinimalDaysInFirstWeek() method does not throw an exception at the time of returning minimum days required in the first week.
在返回第一周所需的最少天数时, getMinimalDaysInFirstWeek()方法不会引发异常。
Syntax:
句法:
public int getMinimalDaysInFirstWeek();
Parameter(s):
参数:
It does not accept any parameter.
它不接受任何参数。
Return value:
返回值:
The return type of the method is int, it returns the minimum days needed in first week of the year.
方法的返回类型为int ,它返回一年中第一周所需的最少天数。
Example:
例:
// Java Program to demonstrate the example of
// int getMinimalDaysInFirstWeek() method of Calendar
import java.util.*;
public class GetMinimialDaysInFirstWeek {public static void main(String args[]) {// Instantiating a Calendar object
Calendar ca = Calendar.getInstance();
// Display current calendar
System.out.println("ca: " + ca.getTime());
// By using getMinimalDaysInFirstWeek() method is
// to return the minimum days required to complete
// the first week of the year
int days_req = ca.getMinimalDaysInFirstWeek();
//Display minimum days required in the first week
System.out.println("ca.getMinimalDaysInFirstWeek(): " + days_req);
}
}
Output
输出量
ca: Mon Jan 27 07:45:16 GMT 2020
ca.getMinimalDaysInFirstWeek(): 1
翻译自: https://www.includehelp.com/java/calendar-getminimaldaysinfirstweek-method-with-example.aspx
Java日历的getMinimalDaysInFirstWeek()方法和示例相关推荐
- java日历类add方法_Java日历setMinimalDaysInFirstWeek()方法与示例
java日历类add方法 日历类setMinimalDaysInFirstWeek()方法 (Calendar Class setMinimalDaysInFirstWeek() method) se ...
- java日历类add方法_Java日历computeTime()方法及示例
java日历类add方法 日历类computeTime()方法 (Calendar Class computeTime() method) computeTime() method is availa ...
- java日历类add方法_Java日历computeFields()方法及示例
java日历类add方法 日历类的computeFields()方法 (Calendar Class computeFields() method) computeFields() method is ...
- java日历类add方法_Java日历setFirstDayOfWeek()方法与示例
java日历类add方法 日历类setFirstDayOfWeek()方法 (Calendar Class setFirstDayOfWeek() method) setFirstDayOfWeek( ...
- java散列法的运用实例,Java HashMap compute() 使用方法及示例
Java HashMap compute() 使用方法及示例 Java HashMap compute()方法计算一个新值,并将其与哈希映射中的指定键相关联. compute()方法的语法为: has ...
- math的用法在java中的使用,Java Math cbrt() 使用方法及示例
Java Math cbrt() 使用方法及示例 Java Math cbrt()方法返回指定数字的立方根. cbrt()方法的语法为: Math.cbrt(double num) 注意:cbrt() ...
- java arraylist 方法返回值,Java ArrayList get() 使用方法及示例
Java ArrayList get() 使用方法及示例 Java ArrayList get()方法返回指定位置存在的元素. get()方法的语法为: arraylist.get(int index ...
- java kryo_Kryo框架使用方法代码示例
Kryo框架的source已移至https://github.com/EsotericSoftware/kryo ,进入此页面,然后点击右边的Download Zip按钮,就能下载到最新版本的Kryo ...
- Java Math toIntExact() 使用方法及示例 long转int
Java Math toIntExact()方法从指定的long参数返回int值. toIntExact()方法的语法为: Math.toIntExact(long value) 注意:toIntEx ...
最新文章
- java中main方法前的public static void及其后面的(String[] args)【笔记自用】
- cadence软件_IC苦逼搬运工入职之——Cadence基本操作(1)
- 工作中收集JSCRIPT代码之(下拉框篇)
- Flash的层叠顺序问题(z-index)
- 电脑技巧:微软电脑管家测试版发布,赶快来体验一下吧!
- 【数值分析】数值分析的微积分学基础
- 提取某一个镇的行政边界_关于获取某个省份下面的 镇的 行政区划编码。
- 报错,Error in created hook: “SyntaxError: Unexpected token o in JSON at position 1“
- 学javascript看什么书?
- ps人像精修照片步骤_PS人像精修
- 模糊PID控制算法 之 C语言实现
- 百度文库付费文档完整查看_无需付费直接下载百度文库!
- MTK手机平台充电原理
- SPI通信调试(ADXL362)
- BOOST电路参数计算
- 解决iPhone模拟器无法启动的方法
- 1.名词(noun)
- 可视化看板:基于电子竞技行业数据大数据可视化分析(详细代码及图文说明)
- 显示接口DP HDMI VGA DVI LVDS的区别
- Python点击Pycharm按钮Run的时候出现Type ‘manage.py help <subcommand>‘ for help on a specific subcommand.