Java tutorial
public class Main { public static void main(String[] args) { double x = 123456.7; double y = -123.45; // 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)); } }