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


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

package com.codingdict;

import java.time.LocalTime;
import java.time.temporal.TemporalQueries;

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

      LocalTime date = LocalTime.parse("10:15:30");
      System.out.printf("LocalTime precision is %s%n",
         date.query(TemporalQueries.precision()));
   }
}