wood burning stoves 2.0*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes about char declaration 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 "about char declaration" Watch "about char declaration" New topic
Author

about char declaration

wei liu
Ranch Hand

Joined: Dec 06, 2001
Posts: 56
what is the range of char data type?
0 to 2^16-1
'\u0000'to'\uFFFF'
are these two declaration correct? why?
Maulin Vasavada
Ranch Hand

Joined: Nov 04, 2001
Posts: 1871
hi,
these are correct as char is UNICODE char in java having 2 bytes (16bits that is 2^16 -1 as max number)
regards
maulin.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: about char declaration