Java Clock get clock from system default time zone

Description

Java Clock get clock from system default time zone

import java.time.Clock;

public class Main {
   public static void main(String[] args) {
      // Get the system default clock
      Clock clock = Clock.systemDefaultZone();
      System.out.println(clock);//from   ww w. j  ava 2  s .  co  m
   }
}



PreviousNext

Related