my dog learned polymorphism*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes What is the numerical range of a 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 "What is the numerical range of a char?" Watch "What is the numerical range of a char?" New topic
Author

What is the numerical range of a char?

Maxwell Wood
Ranch Hand

Joined: Feb 15, 2011
Posts: 49
i know this is a silly question but i just wanna make sure
is it -32768 . . . 32767???
Stephan van Hulst
Bartender

Joined: Sep 20, 2010
Posts: 3599
    
  14

No. It's 0..65535. Chars are unsigned.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

You can find answers to questions like these in the Java Language Specification. The answer to your question can be found in section 4.2.1.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Maxwell Wood
Ranch Hand

Joined: Feb 15, 2011
Posts: 49
thank you guys
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is the numerical range of a char?
 
Similar Threads
media player applet
WA #1.....word association
Posting to bump up my count...
Text box value is not being completely filled with request attribute
The x900 effect ?