File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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
 
Similar Threads
char declaration problem
IS THIS LEGAL
character initialization
doubt in Literals
why "...." is valid?