java.lang.Math.nextUp(double d)


java.lang.Math.nextUp(double d)

package com.codingdict;



import java.lang.*;



public class MathDemo {



   public static void main(String[] args) {



      // get two double numbers

      double x = 98759.765;

      double y = 154.28764;



      // print the next floating numbers towards positive infinity

      System.out.println("Math.nextUp(" + x + ")=" + Math.nextUp(x));

      System.out.println("Math.nextUp(" + y + ")=" + Math.nextUp(y));

   }

}