- java.time 包类
- java.time - 主页
- java.time - 时钟
- java.time - 时长
- java.time - 瞬间
- java.time - 本地日期
- java.time - 本地日期时间
- java.time - 本地时间
- java.time - 月日
- java.time - 偏移日期时间
- java.time - 偏移时间
- java.time - 周期
- java.time - 年
- java.time - 年月
- java.time - 分区日期时间
- java.time - 时区标识符
- java.time - 时区偏移量
- java.time 包枚举
- java.time - 月份
- java.time 有用资源
- java.time - 讨论
java.time.ZonedDateTime.getSecond() 方法示例
说明
java.time.ZonedDateTime.getSecond() 方法获取分钟秒字段。
声明
以下是 java.time.ZonedDateTime.getSecond() 方法的声明。
public int getSecond()
public int getSecond()
返回值
分钟秒,从 0 到 59。
示例
package com.tutorialspoint;
import java.time.ZonedDateTime;
public class ZonedDateTimeDemo {
public static void main(String[] args) {
ZonedDateTime date = ZonedDateTime.parse("2017-03-28T12:25:38.492+05:30[Asia/Calcutta]");
System.out.println(date.getSecond());
}
}
现场演示
38
打印页面