LocalTime plusNanos(long nanosToAdd)
returns a copy of this LocalTime with the specified period in nanoseconds added.
plusNanos
has the following syntax.
public LocalTime plusNanos(long nanosToAdd)
The following example shows how to use plusNanos
.
import java.time.LocalTime; public class Main { public static void main(String[] args) { LocalTime l = LocalTime.now(); LocalTime s = l.plusNanos(1234); System.out.println(s); } }
The code above generates the following result.