• Post Reply Bookmark Topic Watch Topic
  • New Topic

What is the numerical range of a char?  RSS feed

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i know this is a silly question but i just wanna make sure
is it -32768 . . . 32767???
 
Saloon Keeper
Posts: 8462
155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. It's 0..65535. Chars are unsigned.
 
Java Cowboy
Sheriff
Posts: 16081
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Maxwell Wood
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you guys
 
A feeble attempt to tell you about our stuff that makes us money
Thread Boost - a very different sort of advertising
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!