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()方法和示例相关推荐

  1. java日历类add方法_Java日历setMinimalDaysInFirstWeek()方法与示例

    java日历类add方法 日历类setMinimalDaysInFirstWeek()方法 (Calendar Class setMinimalDaysInFirstWeek() method) se ...

  2. java日历类add方法_Java日历computeTime()方法及示例

    java日历类add方法 日历类computeTime()方法 (Calendar Class computeTime() method) computeTime() method is availa ...

  3. java日历类add方法_Java日历computeFields()方法及示例

    java日历类add方法 日历类的computeFields()方法 (Calendar Class computeFields() method) computeFields() method is ...

  4. java日历类add方法_Java日历setFirstDayOfWeek()方法与示例

    java日历类add方法 日历类setFirstDayOfWeek()方法 (Calendar Class setFirstDayOfWeek() method) setFirstDayOfWeek( ...

  5. java散列法的运用实例,Java HashMap compute() 使用方法及示例

    Java HashMap compute() 使用方法及示例 Java HashMap compute()方法计算一个新值,并将其与哈希映射中的指定键相关联. compute()方法的语法为: has ...

  6. math的用法在java中的使用,Java Math cbrt() 使用方法及示例

    Java Math cbrt() 使用方法及示例 Java Math cbrt()方法返回指定数字的立方根. cbrt()方法的语法为: Math.cbrt(double num) 注意:cbrt() ...

  7. java arraylist 方法返回值,Java ArrayList get() 使用方法及示例

    Java ArrayList get() 使用方法及示例 Java ArrayList get()方法返回指定位置存在的元素. get()方法的语法为: arraylist.get(int index ...

  8. java kryo_Kryo框架使用方法代码示例

    Kryo框架的source已移至https://github.com/EsotericSoftware/kryo ,进入此页面,然后点击右边的Download Zip按钮,就能下载到最新版本的Kryo ...

  9. Java Math toIntExact() 使用方法及示例 long转int

    Java Math toIntExact()方法从指定的long参数返回int值. toIntExact()方法的语法为: Math.toIntExact(long value) 注意:toIntEx ...

最新文章

  1. java中main方法前的public static void及其后面的(String[] args)【笔记自用】
  2. cadence软件_IC苦逼搬运工入职之——Cadence基本操作(1)
  3. 工作中收集JSCRIPT代码之(下拉框篇)
  4. Flash的层叠顺序问题(z-index)
  5. 电脑技巧:微软电脑管家测试版发布,赶快来体验一下吧!
  6. 【数值分析】数值分析的微积分学基础
  7. 提取某一个镇的行政边界_关于获取某个省份下面的 镇的 行政区划编码。
  8. 报错,Error in created hook: “SyntaxError: Unexpected token o in JSON at position 1“
  9. 学javascript看什么书?
  10. ps人像精修照片步骤_PS人像精修
  11. 模糊PID控制算法 之 C语言实现
  12. 百度文库付费文档完整查看_无需付费直接下载百度文库!
  13. MTK手机平台充电原理
  14. SPI通信调试(ADXL362)
  15. BOOST电路参数计算
  16. 解决iPhone模拟器无法启动的方法
  17. 1.名词(noun)
  18. 可视化看板:基于电子竞技行业数据大数据可视化分析(详细代码及图文说明)
  19. 显示接口DP HDMI VGA DVI LVDS的区别
  20. Python点击Pycharm按钮Run的时候出现Type ‘manage.py help <subcommand>‘ for help on a specific subcommand.

热门文章

  1. 列表生成式(List)
  2. RHEL7 修改SSH默认端口
  3. 什么是分布式系统的CAP理论?
  4. 客户端SDK测试思路
  5. maven 国内私服
  6. 左右xcode的重构选项的一些理解
  7. openstack nova-network 的小bug的排错经历
  8. C4.5决策树算法概念学习
  9. IE6PNG8PNG24test
  10. 检测Java对象所占内存大小 (转载)