Java Timestamp getNanos() MethodThe getNanos() method of Timestamp class fetches the Timestamp object's nanos value . SyntaxParametersNA ReturnsThe getNanos() method of Timestamp class returns this Timestamp object?s nanos value. Example 1Test it NowOutput: Timestamp : 2018-09-01 09:01:15.0 Fractional seconds component : 0 Example 2Test it NowOutput: Timestamp : 2018-09-01 09:01:15.45 Fractional seconds component : 450000000
Next TopicJava Timestamp
|