Online Java Compiler By
JavaTpoint.com
public class GetExponentExample4 { public static void main(String[] args) { float a = 1.0f/0; // Input infinity of float type, Output (Float.MAX_EXPONENT+1) System.out.println(Math.getExponent(a)); } }
Output