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 201 views
1 answer 179 views
1 answer 162 views
1 answer 179 views
1 answer 171 views
1 answer 165 views
1 answer 161 views
...