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

1 Answer

0 votes
package javaapplication1;

public class JavaApplication1 {

    public static void main(String[] args) {

        try {

            System.out.println(Character.TYPE);
            System.out.println(Character.SIZE);
            System.out.println((int) Character.MIN_VALUE);
            System.out.println((int) Character.MAX_VALUE);

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

/*
              
run:
 
char
16
0
65535
     
 */

 



answered Dec 9, 2016 by avibootz

Related questions

1 answer 179 views
1 answer 171 views
1 answer 183 views
1 answer 165 views
1 answer 228 views
1 answer 173 views
1 answer 156 views
...