How to get the size, min and max of Float Data Type in Java

1 Answer

0 votes
package javaapplication1;

public class JavaApplication1 {

    public static void main(String[] args) {

        try {

            System.out.println(Float.TYPE);
            System.out.println(Float.SIZE);
            System.out.println(Float.MIN_VALUE);
            System.out.println(Float.MAX_VALUE);

        } catch (Exception e) {
            System.out.println(e.toString());
        }
    }
}

/*
              
run:
 
float
32
1.4E-45
3.4028235E38
     
 */

 



answered Dec 10, 2016 by avibootz

Related questions

1 answer 197 views
1 answer 178 views
1 answer 157 views
1 answer 177 views
1 answer 166 views
1 answer 163 views
1 answer 159 views
...