Online Java Compiler By
JavaTpoint.com
public class RintExample4 { public static void main(String[] args) { double x = 1.0/0; // Input positive infinity, Output positive infinity System.out.println(Math.rint(x)); } }
Output