The getNano() method of a LocalTime class is used to return the nano-of-second field. This method returns an integer value ranging from 0 to 999,999,999, i.e. the Nanos of a second.
public int getNano()
Parameters: This method does not accept any parameter.
Return value: This method returns an integer value which represents nano-of-second and it ranges from 0 to 999,999,999.
Below programs illustrate the getNano() method:
Nano Field: 630000000
Nano Field: 530000000
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course.