Java Math.nextAfter() method21 Mar 2025 | 2 min read The java.lang.Math.nextAfter() returns the floating-point number adjacent to the first argument in the direction of the second argument. If both first argument and second argument are same then this method will return second argument. Syntax:Parameters:Return:
Example 1Output: 84352.23999999999 154.28400000000002 Example 2Output: 787.84296 Example 3Output: 1.0E-323 Example 4Output: 3.4028233E38 Next TopicJava Math |
We request you to subscribe our newsletter for upcoming updates.

We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India