java.time.LocalDateTime.query() 方法示例


java.time.LocalDateTime.query() 方法示例

package com.codingdict;

import java.time.LocalDateTime;
import java.time.temporal.TemporalQueries;

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

      LocalDateTime date = LocalDateTime.parse("2014-12-03T10:15:30");
      System.out.printf("LocalDateTime precision is %s%n",
         date.query(TemporalQueries.precision()));
   }
}