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