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

1 Answer

0 votes
package javaapplication1;

public class JavaApplication1 {

    public static void main(String[] args) {

        try {

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

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

/*
              
run:
 
byte
8
-128
127
     
 */

 



answered Dec 8, 2016 by avibootz

Related questions

1 answer 166 views
1 answer 202 views
1 answer 179 views
1 answer 171 views
1 answer 183 views
1 answer 165 views
1 answer 162 views
...