- java.time 软件包类
- java.time - 主页
- java.time - 时钟
- java.time - 持续时间
- java.time - Instant
- java.time - LocalDate
- java.time - LocalDateTime
- java.time - LocalTime
- java.time - MonthDay
- java.time - OffsetDateTime
- java.time - OffsetTime
- java.time - Period
- java.time - 年
- java.time - 年月
- java.time - ZonedDateTime
- java.time - ZoneId
- java.time - ZoneOffset
- java.time 软件包枚举
- java.time - 月份
- java.time 有用资源
- java.time - 讨论
java.time.ZoneOffset.getId() 方法示例
描述
java.time.ZoneOffset.getId() 方法获取唯一的偏移量 ID。
声明
以下是 java.time.ZoneOffset.getId() 方法的声明。
public abstract String getId()
public String getId()
返回值
偏移量唯一 ID,非空
示例
package com.tutorialspoint;
import java.time.ZoneOffset;
public class ZoneOffsetDemo {
public static void main(String[] args) {
ZoneOffset zoneOffset = ZoneOffset.of("Z");
System.out.println(zoneOffset.getId());
}
}
在线演示
Z
Print Page