java.time.ZoneOffset.equals() 方法示例


java.time.ZoneOffset.equals() 方法示例

package com.codingdict;

import java.time.ZoneOffset;

public class ZoneOffsetDemo {
   public static void main(String[] args) {

      ZoneOffset zone1 = ZoneOffset.of("Z");
      System.out.println(zone1);  
      ZoneOffset zone2 = ZoneOffset.of("+02:00");
      System.out.println(zone2);  
      System.out.println(zone1.equals(zone2));  
   }
}