Example usage for java.time LocalTime withNano

List of usage examples for java.time LocalTime withNano

Introduction

In this page you can find the example usage for java.time LocalTime withNano.

Prototype

public LocalTime withNano(int nanoOfSecond) 

Source Link

Document

Returns a copy of this LocalTime with the nano-of-second altered.

Usage

From source file:Main.java

public static void main(String[] args) {
    LocalTime l = LocalTime.now();
    LocalTime s = l.withNano(1234);
    System.out.println(s);/* www  . j  av a 2s  .  c  o  m*/
}