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

1 Answer

0 votes
package javaapplication1;

public class JavaApplication1 {

    public static void main(String[] args) {

        try {

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

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

/*
              
run:
 
long
64
-9223372036854775808
9223372036854775807
     
 */

 



answered Dec 10, 2016 by avibootz

Related questions

1 answer 140 views
1 answer 137 views
1 answer 183 views
1 answer 147 views
...