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