File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes range of char Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "range of char" Watch "range of char" New topic

range of char

ronak mehta

Joined: Aug 14, 2001
Posts: 23
i the range of the char type is o to 65535 for integer values..
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
From the JLS section 4.2.1

4.2.1 Integral Types and Values
The values of the integral types are integers in the following ranges:
For byte, from -128 to 127, inclusive
For short, from -32768 to 32767, inclusive
For int, from -2147483648 to 2147483647, inclusive
For long, from -9223372036854775808 to 9223372036854775807, inclusive
For char, from '\u0000' to '\uffff' inclusive, that is, from 0 to 65535

hope that helps

Sun Certified Programmer for the Java� 2 Platform

I agree. Here's the link:
subject: range of char
It's not a secret anymore!