Java StrictMath.nextUp(double d)

Syntax

StrictMath.nextUp(double d) has the following syntax.

public static double nextUp(double d)

Example

In the following code shows how to use StrictMath.nextUp(double d) method.


/* ww w .  j ava2  s.co  m*/
public class Main {

  public static void main(String[] args) {
  
    double d1 = 12.3400000000000 , d2 = 98.76;
     
    System.out.println(StrictMath.nextUp(d1));
     
    System.out.println(StrictMath.nextUp(d2));
  }
}

The code above generates the following result.





















Home »
  Java Tutorial »
    java.lang »




Boolean
Byte
Character
Class
Double
Enum
Float
Integer
Long
Math
Number
Object
Package
Process
ProcessBuilder
Runnable
Runtime
SecurityManager
Short
StackTraceElement
StrictMath
String
StringBuffer
StringBuilder
System
Thread
ThreadGroup
ThreadLocal
Throwable