Get exponent

ReturnMethodSummary
static intgetExponent(double d)Returns the exponent for a double.
static intgetExponent(float f)Returns the exponent for a float.

public class Main {
  public static void main(String[] args) {

    System.out.println(Math.getExponent(2));
  }
}

The output:


1
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.